I have a requirement of toggling between div show/hide. I could achieve it through following code
<div class="fav-player" ng-repeat = "selectedPlayer in selectedPlayers">
<div class="player-head">
<div class="player-name" ng-click="showDetails = ! showDetails" id="name-{{selectedPlayer.id}}">{{selectedPlayer.firstName}})</div>
</div>
<div class="fav-player-score-detail" id="fav-{{selectedPlayer.id}}" ng-show="showDetails">
Hi, I am {{selectedPlayer.firstName}} - shown now
</div>
</div>
Clicking the div: player-head shows fav-player-score-detail But, challenge is to hide all other DIVs except the one shown. I should not see all the DIVs expanded at once. Only one should be expanded. Pls help!
Thanks in advance!