ionViewWillEnter() Is not available on Ionic 4 angular type projects. (
ionic start myApp --type=angular)
From v4 guide:
Some of the Ionic lifecycle events are equivalent to Angular lifecycle hooks. For example,
ionViewDidLoad() fills the same role as the Angular
OnInit lifecycle hook (
ngOnInit() ). In such cases, use the Angular lifecycle hook.
OnInit still runing only once and the other lifecycle events (like ngAfterContentInit, ngAfterContentChecked…) are fired a lot of times after router navigate.
The problem persist.
What I Trying to do? I have 3 pages:
A: Panel with statistics
B: List with all records
C: New record page
From A to B data is loaded correctly after router.navigate
but From C returning to B the data list is not updating.
In B page I have on OnInit a function that get data from database, but it only works when I load B page at first time (from A to B), not after create a new record on page C, on Page C After save the new record I have a router.navigate that redirects to B page again, it’s very simple but it’s nor working like the expected.