<ion-header *ngIf="subNav.path.length as length">
  <ion-toolbar class="subheader" color="dark">
    <ion-buttons slot="start" *ngIf="length > 1">
      <ion-button color="light" (click)="subNav.pop(nav)">
        <ion-icon slot="icon-only" name="arrow-back-outline"></ion-icon>
      </ion-button>
    </ion-buttons>
    <ion-title>
      <span *ngFor="let segment of subNav.path; let i = index">
        /
        <span *ngIf="i === length -1"> {{ segment }}</span>
        <a *ngIf="i !== length -1" style="cursor: pointer;" (click)="subNav.popTo(i, nav)"> {{ segment }}</a>
      </span>
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-nav [root]="rootPage" [rootParams]="rootParams"></ion-nav>