mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
910de8bc33
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
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT