I'm working in and angular 9 app implementing NgRx with lazy load
when the app loads, my state looks like this
and when I navigate to the route '/account-config' the state change becouse I have lazy loaded the module and implemented a StoreModule.forFeature int he imports. Then, my state looks like this
I want to know if there is a way to delete the 'accountconfig' node when I navigate to other route, and put again when I go back to '/account-config'.
these are my routes:
const routes: Routes = [
{
path: '',
component: AppLayoutComponent,
canActivate: [ AuthGuard ],
children: [
{ path: 'dashboard', loadChildren: () => import('./pages/modules/dashboard/dashboard.module').then(m => m.DashboardModule) },
{ path: 'account-config', loadChildren: () => import('./pages/modules/account-config/account-config.module').then(m => m.AccountConfigModule) },
]
},
{
path: '',
component: AuthLayoutComponent,
children: [
{ path: 'session', loadChildren: () => import('./pages/modules/session/session.module').then(m => m.SessionModule) }
]
},
{
path: '**',
redirectTo: 'session/not-found'
}
];