Hi everyone,
I’m having a problem using a custom component inside on my ionic2 pages, apparently elements using ionic directives are not properly styled inside elements,
Here is my custom component:
menu-button.component.html
<ion-buttons right>
<button ion-button primary> Test</button>
<button ion-button menuToggle primary>
<ion-icon name="menu"></ion-icon>
</button>
</ion-buttons>
menu-button.component.ts
import { Component } from "@angular/core";
@Component({
selector: 'app-menu-button',
templateUrl: './menu-button.component.html',
})
export class MenuButtonComponent{
}
And, the page using it (just to show you whats happening):
<ion-header>
<ion-navbar>
<app-menu-button></app-menu-button>
<ion-title>Map</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<app-menu-button></app-menu-button>
</ion-content>
Result:
I was expecting for the menu icon to be aligned on the the same line as the title, and on right, besides “Test” button. Any idea why would this be happening?
Ionic Info:
Cordova CLI: 6.5.0
Ionic Framework Version: 3.1.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.5
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.10.1
Xcode version: Not installed
Thanks in advance!