angular/packages/router/testing/src
Andrew Scott 910de8bc33 feat(router): Add Route.title with a configurable TitleStrategy (#43307)
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
2022-01-27 22:02:33 +00:00
..
extra_router_testing_providers.ts refactor(router): add stub files for g3 patch of NgModuleFactoryLoader (#43660) 2021-10-04 10:28:02 -07:00
router_testing_module.ts feat(router): Add Route.title with a configurable TitleStrategy (#43307) 2022-01-27 22:02:33 +00:00
spy_ng_module_factory_loader.ts refactor(router): add stub files for g3 patch of NgModuleFactoryLoader (#43660) 2021-10-04 10:28:02 -07:00
testing.ts refactor(router): add stub files for g3 patch of NgModuleFactoryLoader (#43660) 2021-10-04 10:28:02 -07:00