在我的控制器中,我有这个: $ scope.selectedItems = [];
$scope.getElementCart = function (){
$scope.selectedItems=$cookieStore.get('key');
}
并在我的html页面中:
<table class="table" data-ng-show="getElementCart ()!=null " >
<thead>
<tr>
<th>title</th>
</tr>
</thead>
<tr data-ng-repeat="elementInCart in getElementCart ()">
<td><span class="list-asset-item">{{elementInCart.title}}</span></td>
</tr>
<tr></tr>
</table>
它会产生此错误:
错误:[$ rootScope:infdig] 10 $ digest()迭代达成。中止! 观察者在最后5次迭代中被解雇:[[“fn:$ watchCollectionWatch; newVal:64; oldVal:63”,“fn:......