我需要使用ng-repeat在此代码中获取2D数组的值。
<div ng-repeat="n in status">
<div ng-repeat="x in n track by $index">
{{n}}
</div>
</div>
我的数组是
$scope.status = [{1,2,4},{4,5,6,7},{8,9}];
现在我得到数组的值但是带引号和数组括号
["1","2","3"]
["4","5","6","7"]
["8","9"]
请帮助
答案 0 :(得分:1)
您的意思是显示x
吗? n
就像你正在看到的一样。
<div ng-repeat="n in status">
<div ng-repeat="x in n track by $index">
{{x}}
</div>
</div>