I am having the below index.html page which has the main content and other views are called inside ion-nav-view directive based on the ionic route.
<body ng-app="index">
<ion-nav-bar class="bar-stable" align-title="center">
    <ion-nav-back-button>
    </ion-nav-back-button>
    <ion-nav-buttons side="left">
        <button class="button" ui-sref="index.view">
            Home
        </button>
    </ion-nav-buttons>
    <ion-nav-buttons side="right">
        <button class="button" ng-click="showPopOver($event)">
            Menu
        </button>
    </ion-nav-buttons>
</ion-nav-bar>
<ion-nav-view></ion-nav-view>
</body>
In my service, I have a method called showPopOver() and I want this to be called in all views as it contains some reusable code.
But I am not able to call the service method in my view. How should I modify my code to enable this?