0
Im新增Angular和Im幫助朋友....他們有一些用'+'和' - '標記構建的複選框來展開摺疊。默認情況下,所有複選框都有「+」....我有一個JS函數,它循環查找節點是否有子節點。如果長度爲「0」我想刪除的「+」和「 - 」所有如何刪除這些元素?
<div ng-repeat="category in list>
<a href="" ng-show="!dList" ng-click="depList=!depList">+</a>
<a href="" ng-show="dList" ng-click="depList=!depList">-</a>
<a href="" ng-click="dList=!depList"></a>
<input type="checkbox" ng-checked="category['@attributes'].isChecked" ng-click="toggleCheckBox1(this,1)">
</div>
的JavaScript
var eObject= $scope.List;
for(var m = 0; m < eObject.length; m++){
if(eObject[m].node.length == 0){
//REMOVE + OR - SIGN HERE!!
} else{
eObject[m].node.length);
}
}