@Elena: I mean Ionic lifecycle hooks. Ionic keeps initialized angular components in a stack-array and calls them pages. They do not get automatically destroyed when you leave a page, so theoretically all the pages in the app could exist in the DOM at a time. This is why additional hooks are needed for knowing when a page was put on top of the stack and became visible.
You can reproduce this by
npminstall -g ionic ionic start # now select an angular project with pre-configured navigation # add ionViewWillEnter() { console.log("entered"); } to one of the page-components. # now as you switch between pages you will see that the method gets triggered # but it is not shown as used
Can't reproduce with Angular lifecycle methods:
:
Please provide a screenshot with a code sample and inspection result.
@Elena: I mean Ionic lifecycle hooks. Ionic keeps initialized angular components in a stack-array and calls them pages. They do not get automatically destroyed when you leave a page, so theoretically all the pages in the app could exist in the DOM at a time. This is why additional hooks are needed for knowing when a page was put on top of the stack and became visible.
You can reproduce this by
I see, thanks for clearing it up. Please vote for https://youtrack.jetbrains.com/issue/WEB-41604 to be notified on any progress with it