Greetings.
I’m new to ionic and trying different features. Recently implemented a custom component for header and getting a really strange issue with it.
component template(nav-header-main):
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>{{title}}</ion-title>
</ion-navbar>
</ion-header>
usage(main.html):
<nav-header-main [title]="'Main Page'"></nav-header-main>
<ion-content padding>
<ion-buttons padding-top>
<button ion-button full round (click)="getAds()">test</button>
</ion-buttons>
</ion-content>
So, this is how the main.html looks like when i use the component:
(button is under the header)
On the other side, if i simply import the component’s html manually:
<!--<nav-header-main [title]="'Main Page'"></nav-header-main>-->
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>Main Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-buttons padding-top>
<button ion-button full round (click)="getAds()">test</button>
</ion-buttons>
</ion-content>
It works as it should
Ionic Framework: 3.5.0
Ionic App Scripts: 2.0.0
Angular Core: 4.1.3
Angular Compiler CLI: 4.1.3
Node: 6.11.0