Simple Navigation, Routing and lifecycle


I need help about my application that I currently develop with ionic 4.

Here is my problem : I have 2 pages :

Here is my routes declarations :

const routes: Routes = [
{ path: ‘’, redirectTo: ‘itemlist’, pathMatch: ‘full’ },
{ path: ‘home’, loadChildren: () => import(’./home/home.module’).then( m => m.HomePageModule)},
{ path: ‘itemlist’, loadChildren: ‘./itemlist/itemlist.module#itemlistPageModule’ },
{ path: ‘additem’, loadChildren: ‘./additem/additem.module#additemPageModule’ },

The main page is “itemlist”. In the ngOnInit function of this page, some datas are getting from a webserver to display items.
When we click on one button of this page, it navigates to the “additem” page by this line : this.router.navigate([’/additem’]);

In the “additem” page, I have a function which is called after that an item is added and which redirect the user to the “itemlist” page with this line : this.router.navigate([’/itemlist’]);

My problem is that the data are not reloaded on the “itemlist” page (so the item we have just added is not displaying by the “itemlist” page…). It appears that the ngOnInit function is not called after the navigation from the “additem” page and so I don t know how to do to get the updated datas…

I read some documentation about lifecycle, routing and navigationControler but I don t find the good configuration to do what i want… I don’t find the solution…

Does anyone can help me ?

(Sorry for my english)

It’s ok… I found the solution for my problem. I replaced the ngOnInit function by the ionViewWillEnter function !