1、问题背景
ng-repeat:对于集合中的元素,循环遍历
2、实现源码
<!DOCTYPE html> <html ng-app> <head> <Meta charset="UTF-8"> <title>AngularJS之ng-repeat指令</title> <script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script> </head> <body> <div ng-init="phone=['13698698525','15800012514','15800096845','15125415421','13798584545']"> <ul> <li ng-repeat="x in phone"> {{x}} </li> </ul> </div> </body> </html>
3、实现结果
原文链接:https://www.f2er.com/angularjs/149079.html