@mattevigo wrote:
I build my own directive rs-notification to handle upcoming MQTT messages and provide visual feedback.
I put this directive inside the ion-nav-buttons component:
<ion-side-menu-content> <ion-nav-bar class="rs-header"> <ion-nav-back-button> </ion-nav-back-button> <ion-nav-buttons side="left"> <button class="button button-icon button-clear ion-navicon color-primary-light" menu-toggle="left"></button> </ion-nav-buttons> <ion-nav-buttons side="right"> <rs-notification></rs-notification> </ion-nav-buttons> </ion-nav-bar> <ion-nav-view name="menuContent"></ion-nav-view> </ion-side-menu-content>
In that case the controller of rs-notification is called twice, if I put the directive in an higher level that won't happen.
Am I doing something wrong?(More details at http://stackoverflow.com/questions/33147537/angular-directives-controller-initialized-twice)
Posts: 5
Participants: 2