ionViewDidLoad in component?


#1

Hi,

I would like to detect when the view (and so the component) is loaded from within the component’s TS.

ionViewDidLoad and ionViewDidEnter work fine in a page but they do not seem to work in a component.

Is there a way to detect when a component did load ?

Jerome.


#2

I solved my problem using the Events system.

But I am still wondering if there is dedicated function I have missed in the documentation.


#3

I just use the angular 2 default ngOnInit:
https://angular.io/docs/ts/latest/guide/lifecycle-hooks.html


#4

ngAfterViewInit
sounds good in this case