Is there a way to hide this tag if it doesn't have a subcategory? I tried using the condition item.length != 0
but it doesn't seem to be working properly.
<multi-select-tree class="multiselectStyle groupStyle"
data-input-model="categoryTree"
multi-select="true" data-output-model="selectAllCategory"
ng-show="item.length!=0" //this is not working as expected
data-default-label="select article group"
data-callback ="selectOnlyCategory(item, selectedItems)">
</multi-select-tree>
$scope.selectOnlyCategory = function(item, selectedItems) {
if (selectedItems !== undefined && selectedItems.length >= 20) {
return false;
} else {
return true;
}
};