I'm updating an existing ionic/angular app and would like to have as little impact on the code as possible. My goal is to add a burger menu, as exists in a ton of other applications. My difficulty comes from the project architecture.
The header is created in a distinct component, nav-bar. It manages different states and context. Each page, modal, etc... sets up his own ion-header tag, but then its content (and mainly the ion-toolbar) is managed in the dedicated navbar component.
Here is a lightened working version of the code :
app.component.html
<ion-app>
<ion-menu content-id="main-content">
<ion-header>
<ion-toolbar>
<ion-title>Menu Content</ion-title>
</ion-toolbar>
</ion-header>
<ion-content class="ion-padding">This is the menu content.</ion-content>
</ion-menu>
<ion-router-outlet *ngIf="isLoggedIn" id="main-content"></ion-router-outlet>
</ion-app>
about.page.html
<ion-header>
<nav-bar [title]="'title.about'"></nav-bar>
</ion-header>
<ion-content padding>
<!-- custom page content -->
</ion-content>
navbar.html
<ion-toolbar>
<ion-buttons slot="start">
<ion-button *ngIf="!isModal" (click)="goToPrevious()">
<ion-icon name="chevron-back"></ion-icon>
</ion-button>
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-title class="title-wrapper" slot="primary">{{ title }}</ion-title>
</ion-toolbar>
The navbar works (as in the title is displayed correctly as the back-button), except the burger button: it is not showing on a the page. In the developer console, I can see the element being added to the page, but not visually. It "magically" appears if I add a "display: block" on it, which clearly doesn't feel right.
What did I miss, why is the button not showing by itself?