http://plnkr.co/edit/pUtuZy?p=preview
I have these 3 border classes:
.border1 {
border: 1px solid #66FFFF;
}
.border2 {
border: 1px solid #33CCFF;
}
.border3 {
border: 1px solid #0099FF;
}
I want the first button that is clicked to gain the border1 class, 2nd button clicked the border2 class and same for border3.
Also I will eventually have code that prevents the user from selecting more than 3 buttons, so the user will only be able to select 3 buttons.
Current markup logic:
<div class="tag"
ng-class="{'border1':selected1, 'border2':selected2, 'border3':selected3}"
ng-mouseover="showTagDetails(t)"
ng-click="clickTag(t)">{{t.name}}</div>
However, I'm unsure as how to write the logic to ensure that the 2nd and 3rd buttons gain the appropriate styles. How would one approach this problem?
$scope.clickTag = function(t) {
}