Reputation: 105
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.
Upvotes: 0
Views: 71
Reputation: 25352
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>
Upvotes: 4