I've used AngularJS's ng-repeat to display a list of <div>
elements.
When I select one <div>
(div1), its background color changes to blue. If I then click on another <div>
(div2), div1's background returns to white and div2's background turns blue.
This is the HTML code:
<div ng-repeat="folder in vm.folders track by $index" >
<span>{{folder.name}}</span>
</div>