mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit adds a property to the navigation options to allow developers to provide transient navigation info that is available for the duration of the navigation. This information can be retrieved at any time with `Router.getCurrentNavigation()!.extras.info`. Previously, developers were forced to either create a service to hold information like this or put it on the `state` object, which gets persisted to the session history. This feature was partially motivated by the [Navigation API](https://github.com/WICG/navigation-api#example-using-info) and would be something we would want/need to have feature parity if/when the Router supports managing navigations with that instead of `History`. PR Close #53303 |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| test | ||
| testing | ||
| upgrade | ||
| .gitignore | ||
| BUILD.bazel | ||
| index.ts | ||
| package.json | ||
| PACKAGE.md | ||
| public_api.ts | ||
| README.md | ||
Angular Router
Managing state transitions is one of the hardest parts of building applications. This is especially true on the web, where you also need to ensure that the state is reflected in the URL. In addition, we often want to split applications into multiple bundles and load them on demand. Doing this transparently isn’t trivial.
The Angular router is designed to solve these problems. Using the router, you can declaratively specify application state, manage state transitions while taking care of the URL, and load components on demand.
Guide
Read the dev guide here.