<div data-ng-cloak="" data-ng-controller="Controller">
<a data-ng-click="changeItems1()">Change Items1</a>
<div data-ng-repeat-start="item1 in model1.items1" style="width:0;height:0;">
</div>
<div data-ng-repeat="item2 in model1.items2" style="border:1px #f00 solid;">
{{ item1 }}, {{ item2 }}
</div>
<div data-ng-repeat-end style="display:none;">
</div>
</div>
<script type="text/javascript">
function Controller($scope){
$scope.model1 = {};
$scope.model1.items1 = [{id:"1"}, {id:"2"}, {id:"3"}, {id:"4"}];
$scope.model1.items2 = [{id:"1a"}, {id:"2a"}, {id:"3a"}];
$scope.changeItems1 = function(){
$scope.model1.items1 = [{id:"1"}, {id:"2"}, {id:"3"}];
}
}
</script>
单击“Change Items1”时,旧的渲染框不会被清理。有人知道那里发生了什么吗?