is another property which affects the behavior of re-running guards and resolvers ... when onSameUrlNavigation: true is set ... then ... it is runGuardsAndResolvers ... so there has to be runGuardsAndResolvers: 'always' (... there are also 'paramsChange' or 'paramsOrQueryParamsChange' possibilities) set on each route definition which you want to affect.
You can see it in action on this Stackblitz demo:
https://stackblitz.com/edit/onsameurlnavigation?file=app/app-routing.module.ts
Without runGuardsAndResolvers only Router events are invoked.
https://github.com/angular/angular/issues/21115
за это спасибо
Обсуждают сегодня