Which is better to use Angular Lifecycle Hook or Ionic Lifecycle hooks specially for initialization when creating a hybrid app using Ionic 4?
Angular lifecycle hook - ngOnInit
ngOnInit() {
this.getData();
}
Ionic lifecycle hook - ionViewWillEnter
ionViewWillEnter() {
this.getData();
}
ionViewWillEnter — Fired when entering a page (also if it’s come back from stack)
ngOnInit will not be triggered, if you come back to a page after putting it into a stack
i think better once ionviewwillenter