ng-repeat循环遍历的用法

ng-repeat循环遍历的用法

    <script src="../angular-1.5.5/angular.min.js"></script>
</head>
<body ng-app="" ng-init="useName=[{id:1,name:'狗'},{id:1,name:'猫'}]">
<p ng-repeat="list in useName">//现遍历相当于for in循环
{{list}} //相当于打印 (此时打印出来的是一个对象)
欢迎:<span ng-bind="list.name"></span>
</p>




</body>

 

posted @ 2017-05-04 17:26  yaomengli  阅读(4665)  评论(0编辑  收藏  举报