首页 > angular for循环输出标签

angular for循环输出标签

如何用angular动态输出$scope.total个数的标签。
当$scope.total = 10时,有10个div标签
当$scope.total = 20时,有20个div标签


<div ng-repeat="item in total"></div>
这不就是total个div吗


可以参考该问题,自己生成一个数组供ng-repeat使用


angular提供了 ng-repeat,直接用就可以了

【热门文章】
【热门文章】