Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(router): Update
Navigation#initialUrl
to match documentation an…
…d reality (angular#43863) BREAKING CHANGE: * The type of `initialUrl` is set to `string|UrlTree` but in reality, the `Router` only sets it to a value that will always be `UrlTree` * `initialUrl` is documented as "The target URL passed into the `Router#navigateByUrl()` call before navigation" but the value actually gets set to something completely different. It's set to the current internal `UrlTree` of the Router at the time navigation occurs. With this change, there is no exact replacement for the old value of `initialUrl` because it was enver intended to be exposed. `Router.url` is likely the best replacement for this. In more specific use-cases, tracking the `finalUrl` between successful navigations can also be used as a replacement. PR Close angular#43863
- Loading branch information