[英]How to show array data in page using angularJs
i want show array data in view page using angularjs and ionic. 我想使用angularjs和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. 谢谢。
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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.