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

How to attach event handler for nav bar buttons inside ion-nav-bar

$
0
0

Hi,

I'm new to Ionic and building a tabs-view app which has a nav bar button inside ion-nav-bar element so the nav bar button appears in each tab. The code looks like this.



 <ion-nav-buttons side="right">
  <button id='take-photo' class="button ion-camera" ng-click='takePhoto()'>
  </button>
</ion-nav-buttons>
</ion-nav-bar>


My question is where to put the takePhoto function since it does not belong to any tab's controller? Thanks!


Viewing all articles
Browse latest Browse all 228595

Trending Articles



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