ionic g page views/detail

在tab1中跳转

  1. <ion-content>
  2. <ion-button [routerLink]="['/detail']" routerLinkActive="router-link-active" >
  3. 跳转detail
  4. </ion-button>
  5. </ion-content>

detail页面中跳回前一个页面

  1. <ion-header>
  2. <ion-toolbar>
  3. //++
  4. <ion-buttons slot="start">
  5. <ion-back-button></ion-back-button>
  6. </ion-buttons>
  7. //+
  8. <ion-title>detail</ion-title>
  9. </ion-toolbar>
  10. </ion-header>