I'm trying to toggle a class when a button is clicked. IE: if button 'rndTotal' is selected, class "selected" is added, and the other buttons have class "selected" removed. I also need this approach to work with my controller, as in, I will have stuff happen based on what is selected.
So far I have:
<div class="row optionRow" ng-init="option = 'exact'" >
<div class="col">
<button ng-class="{selected:option=='exact'}">Exact</button>
</div>
<div class="col">
<button ng-class="{selected:option=='rndTip'}">Round Tip</button>
</div>
<div class="col">
<button ng-class="{selected:option=='rndTotal'}">Round Total</button>
</div>
</div>
It defaults to 'exact' but doesn't function other than that.