<div id="whole-div" ng-hide="hideme">
<div id="loop-div" ng-repeat="i in [1, 2, 3]">
<button ng-click="hideme=true">Button {{i}}</button>
</div>
</div>
Above is the code I have right now. I want it so that when you click one of the buttons made within the loop (Button1, Button2, Button3), the whole div is hidden. However, I found that I can only hide the whole div when the button is on the outside like follows...
<div id="whole-div" ng-hide="hideme">
<div id="loop-div" ng-repeat="i in [1, 2, 3]">
<button>Button {{i}}</button> </div>
<button ng-click="hideme=true">Final Button</button>
</div>
Is there a way to hide the whole div using one of the inner buttons in the loop div? Thanks in advance!