Im building a simple menu in Angular:
<ion-nav-view name="section"></ion-nav-view>
<div class="tabs-striped tabs-color-assertive tabs-icon-top">
<div class="tabs">
<a class="tab-item" ng-click="menuClick(1)">
<i class="icon ion-home"></i>
Test
</a>
<a class="tab-item" ng-click="menuClick(2)">
<i class="icon ion-star"></i>
Favorites
</a>
<a class="tab-item" ng-click="menuClick(3)">
<i class="icon ion-gear-a"></i>
Settings
</a>
</div>
</div>
The controller that handles this view is:
app.controller('menu', function ($scope, $state) {
$scope.menuClick = function(btn) {
if(btn == 1) {
$state.go('app.lists');
}
else if(btn == 2)
$state.go('app.pay');
}
});
How can I add a class to the button just pressed?