小编Eri*_*eis的帖子

为什么$ scope中的数组不使用数组concat方法更新?

当我使用concat方法时,我的$ scope不会更新

var anotherList = ["2", "3", "4"];
$scope.list     = [];

$scope.list.concat(anotherList);
Run Code Online (Sandbox Code Playgroud)

但是在循环中使用数组推送方法,我的$ scope会更新

arrays angularjs angularjs-scope angularjs-ng-repeat

2
推荐指数
1
解决办法
489
查看次数