8a56c99f87
The current implementation for redirecting users inside guards was in place before the feature was added to allow `CanActivate` and `CanActivateChild` guards to return `UrlTree` for redirecting users. Returning `UrlTree` should be the default method, as it provides a more desirable redirecting experience. When using `router.navigate` followed by `return false`, the `Router` calls `resetUrlToCurrentUrlTree` (in the `finalize` operator) before processing the navigation to the new route. This can result in an undesirable history if the navigation was the first navigation in the application - that is, the route will briefly be reset to just `/` (see #36187). Fixes #36187 PR Close #37100 |
||
---|---|---|
.. | ||
cli | ||
cli-src | ||
examples | ||
guide | ||
images | ||
marketing | ||
start | ||
tutorial | ||
file-not-found.md | ||
license.md | ||
navigation.json |