Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Controller called twice for custom directive inside ion-nav-buttons

$
0
0

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)


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>