I need a controller inside the ion-nav-buttons to display badges based on need. But the controller inside the ion-nav-buttons is fired twice, whereas it works smoothly if I put it outside the ion-nav-buttons.
Example: Ionic Playground Link
HTML content
<body ng-app="app">
<ion-side-menus>
<ion-side-menu-content>
<ion-nav-bar class="bar bg-main">
<ion-nav-back-button style="color: #fff">
</ion-nav-back-button>
<ion-nav-back-button style="color: #fff">
</ion-nav-back-button>
<ion-nav-buttons side="right">
<a ng-href="#/notification" class="button" ng-controller="NotifyCtrl">
</a>
</ion-nav-buttons>
</ion-nav-bar>
<ion-nav-view name="" animation="slide-left-right"></ion-nav-view>
</ion-side-menu-content>
</ion-side-menus>
</body>
Code
angular.module('app', ['ionic']).
controller('NotifyCtrl', ['$scope', function($scope){
alert();
}]);