hello there, im using ionic angular for my mobile app, i created page for tabs, unitab.page.ts, there is the unitab-routing-module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { UnitabPage } from './unitab.page';
import { DvirPageModule } from '../dvir/dvir.module';
import { DvirPage } from '../dvir/dvir.page';
const routes: Routes = [
{
path: '',
component: UnitabPage,
children: [
{
path: 'hos',
loadChildren: () =>
import('../hos/hos.module').then((m) => m.HosPageModule),
},
{
path: 'dvir',
component: DvirPage,
},
{
path: 'inspection',
loadChildren: () =>
import('../inspection/inspection.module').then(
(m) => m.InspectionPageModule
),
},
{
path: 'others',
loadChildren: () =>
import('../others/others.module').then((m) => m.OthersPageModule),
},
{
path: '',
redirectTo: '/unitab/hos',
pathMatch: 'full',
},
],
},
{
path: '',
redirectTo: '/unitab/hos',
pathMatch: 'full',
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class UnitabPageRoutingModule {}
the problem is that on dvir page I move to edit-dvir page, make some changes, and when I save and use this.navCtrl.navigateBack('/unitab/dvir');
, on dvir page doesnāt trigger either ngOnInit, ionViewWillEnter, ionViewDidEnter, but at the same time, in unitab page ts ngOninit is working, what could be the problem and how to solve it?
I need to trigger ionViewWillEnter, when i navigateBack to it not by clicking tabs, but using this.navCtrl.navigateForward(ā/insert-dvirā);
sorry for my English, hope u understood me!