mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit provides a service, `PageTitleStrategy` for setting the document page title after a successful router navigation. Users can provide custom strategies by extending `TitleStrategy` and adding a provider which overrides it. The strategy takes advantage of the pre-existing `data` and `resolve` concepts in the Router implementation: We can copy the `Route.title` into `data`/`resolve` in a non-breaking way by using a `symbol` as the key. This ensures that we do not have any collisions with pre-existing property names. By using `data` and `resolve`, we do not have to add anything more to the router navigation pipeline to support this feature. resolves #7630 PR Close #43307 |
||
|---|---|---|
| .. | ||
| extra_router_testing_providers.ts | ||
| router_testing_module.ts | ||
| spy_ng_module_factory_loader.ts | ||
| testing.ts | ||