0

i want show array data in view page using angularjs and ionic.

Here is my category controller output array format:

["Mouse", "Keyboard"]

Here is view code:

<span ng-repeat="cat in category track by $index">
   <ion-item ui-sref="home.add" href="#">
      <h2 class="list-text">{{cat.data}}</h2>
   </ion-item>
</span>

Please help me to find out the problem.

Thank You.

1 Answer 1

4

Try like this

<span ng-repeat="cat in category track by $index">
   <ion-item ui-sref="home.add" href="#">
      <h2 class="list-text">{{cat}}</h2>
   </ion-item>
</span>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.