I have controller
<div ng-controller="LeftSideNavWorkController as vm" ">
<div ng-repeat="item in vm.items track by $index">
<div ng-click="vm.hideAllElements()>Hide</div>
<div ng-show = "showChildren[$index]" >Show/Hide element<div>
</div>
</div>
in controller:
vm.hideAllElements = hideAllElements;
vm.items = [... ... ...]; //some array of items
function hideAllElements() {
//how set all showChildren[] variables to false?
}
the task is that when I click on one it should set all vm.show = false
Close all repeated elements- not clear with this? What exactly is the desired result? Can you please elaborate?