Consider the following route configuration:
const routes: Routes = [ { path: '', component: AppComponent, resolve: { app: AppResolver }, children: [ { path: 'user/:uid', resolve: { user: UserResolver }, children: [ { path: '', component: ViewUserComponent }, { path: 'edit', component: EditUserComponent } ] } ] } ];
User data is retrieved by UserResolver for any children on the /user/:uid route. Using this data, the user profile can be viewed by going to /user/:uid , and then editing it by going to /user/:uid/edit . After successful editing, the updated user <<22>) could be redirected to the profile.
However, both the viewing page and the editing page are children of the allowed route, the converter does not start when switching from one to another.
Therefore, when moving from the editing component to the presentation component, the displayed data is still old, not updated.
Will there be any way to invalidate the allowed user data to force the resolver to retrieve it from the server again? Or is there any other way to achieve such a result?
The app data does not change, we do not need to reload it.
source share