Angular won't re-render the component even with onSameUrlNavigation: 'reload'
as per its documentation (https://v17.angular.io/api/router/OnSameUrlNavigation) this is usually used when you want to re-trigger a canMatch
guard.
The easiest way is to add a listener to the params subject in Route
in your component and wait for changes, then refresh your state.
private async doInit() {
await this.doMyStuff();
await this.doAwesomeStuff();
}
public async onInit() {
await this.doInit();
}
constructor(
private readonly route: ActivatedRoute,
) {
this.route.params.subscribe(async (params: Params) => await this.doInit());
}