Arquivo da tag: Events

Ionic 2 – Eventos nativos do NavController

[code type=javascript]
import { Component } from ‘@angular/core’;

@Component({
template: ‘Hello World’
})
class HelloWorld {
ionViewDidLoad() {
console.log(“I’m alive!”);
}
ionViewWillLeave() {
console.log(“Looks like I’m about to leave :(“);
}
}

Eventos:

  • ionViewDidLoad
  • ionViewWillEnter
  • ionViewDidEnter
  • ionViewWillLeave
  • ionViewDidLeave
  • ionViewWillUnload
  • ionViewCanEnter
  • ionViewCanLeave

http://ionicframework.com/docs/v2/api/navigation/NavController/#lifecycle-events