angularJS1遍历

mac2022-06-30  81

针对对象数组(key,value)

var objs =[{a:1},{a:2}]; angular.forEach(objs, function(data,index,array){ //data等价于array[index] console.log(data.a+'='+array[index].a); });

转载于:https://www.cnblogs.com/xiaoQ0725/p/7993148.html

相关资源:AngularJS遍历获取数组元素的方法示例
最新回复(0)