Controller in main tab?


#1

Hi have a project based on the ionic tabs.

I need a popover in the header. How can i control the popover and to make it appear and work in all tabs?

I put a more button in my header like this.

And i put a header and un button in the templates/tabs.html page.

<ion-nav-bar class="bar-dark">
    <ion-nav-back-button class="nodrag">
    </ion-nav-back-button>
    <ion-nav-buttons side="right">
        <button class="button button-icon icon ion-more" ng-click="openPopover($event)">
        </button>
    </ion-nav-buttons>
</ion-nav-bar>

But there’s no controller associate with the main tab template.

.state('tab', {
        url: '/tab',
        abstract: true,
        templateUrl: 'templates/tabs.html'
    })

How can i make this popover work on every page?

And i also need to set the popover on the ionic style template. not the android or IOS one.


#2

Ok, i just find out: Global ion-nav-buttons

But i still need to change this popover with the IONIC platform style. because with the android platform it appear to hight for my need.

I also want to know why this popover list do not have a grey background on click like every href A list link in ionic?


#3

Ok, solution for popover position. i wanted it only for the browser platform finally.

.platform-browser #menuPopover {
    top: 79px !important;
}

Ok, only the background thing on click now.

I also want to know why this popover list do not have a grey background on click like every href A list link in ionic?


#4

Hi Have you figured this out? I think I’m trying the exact as you.