extend扩展对象属性
<@H_404_7@script> var m=angular.module("hd",[]); m.controller("ctrl",["$scope",function($scope){ var obj={name:"leilei"}; angular.extend(obj,{url:"http:xxx.com"}) console.log(obj); }]) </@H_404_7@script>
forEach进行数组遍历
var arr_Obj=
[
{name:"张三",age:12,website:"http://zhangsan.com"},{name:"李四",age:23,website:"http://lisi.com"}
]
angular.forEach(arr_Obj,function(v,k){
//...Do Something
});