import { Component } from '@angular/core' ; import { AlertController , App , IonicPage , NavController , NavParams , ViewController } from '../../../../../..' ; @ IonicPage ( { name : 'full-page' } ) @ Component ( { template : `
    <ion-content padding>
      <h1>Full page</h1>
      <p>This page does not have a nav bar!</p>
      <p><button ion-button (click)="navCtrl.pop()">Pop</button></p>
      <p><button ion-button class="e2eFrom2To3" (click)="pushPrimaryHeaderPage()">Push to PrimaryHeaderPage</button></p>
      <p><button ion-button (click)="pushAnother()">Push to AnotherPage</button></p>
      <p><button ion-button (click)="pushFirstPage()">Push to FirstPage</button></p>
      <p><button ion-button class="e2eFrom2To1" navPop>Pop with NavPop (Go back to 1st)</button></p>
      <p><button ion-button (click)="setPages()">setPages() (Go to PrimaryHeaderPage, FirstPage 1st in history)</button></p>
      <p><button ion-button (click)="presentAlert()">Present Alert</button></p>
    </ion-content>
  ` } ) export class FullPage { constructor ( public navCtrl , public viewCtrl , public app , public alertCtrl , public params ) { } ionViewDidLoad ( ) { console . log ( 'ionViewDidLoad, FullPage' , this . viewCtrl . id ) ; } ionViewWillEnter ( ) { console . log ( 'ionViewWillEnter, FullPage' , this . viewCtrl . id ) ; } ionViewDidEnter ( ) { console . log ( 'ionViewDidEnter, FullPage' , this . viewCtrl . id ) ; } ionViewWillLeave ( ) { console . log ( 'ionViewWillLeave, FullPage' , this . viewCtrl . id ) ; } ionViewDidLeave ( ) { console . log ( 'ionViewDidLeave, FullPage' , this . viewCtrl . id ) ; } ionViewWillUnload ( ) { console . log ( 'ionViewWillUnload, FullPage' , this . viewCtrl . id ) ; } setPages ( ) { let items = [ { page : 'first-page' } , { page : 'primary-header-page' } ] ; this . navCtrl . setPages ( items ) ; } pushPrimaryHeaderPage ( ) { this . navCtrl . push ( 'primary-header-page' ) ; } pushAnother ( ) { this . navCtrl . push ( 'another-page' ) ; } pushFirstPage ( ) { this . navCtrl . push ( 'first-page' ) ; } presentAlert ( ) { let alert = this . alertCtrl . create ( ) ; alert . setTitle ( 'Hello Alert' ) ; alert . setMessage ( 'Dismiss this alert, then pop one page' ) ; alert . addButton ( { text : 'Dismiss' , role : 'cancel' , handler : ( ) => { alert . dismiss ( ) . then ( ( ) => { this . navCtrl . pop ( ) ; } ) ; return false ; } } ) ; alert . present ( ) ; } }