angular/packages/router/test/integration
Andrew Scott da364d2635 refactor(router): Add support for precommitHandler in Navigation integration
The `precommitHandler` of the Navigation API unlocks some of the truly
powerful features for Routers like Angular's which defer the URL
updates. Without the `precommitHandler`, we cannot initiate a navigation
until we are ready to commit the URL because it causes the URL to update
immediately.

With `precommitHandler` support, we are able to create a `NavigateEvent`
_immediately_ on navigation, which allows the browser to show that a
navigation is happening with a loading indicator. Site visitors will
also have the ability to cancel the navigation with the "stop" button.
When we are ready to commit the URL, the precommitHandler supports a
"redirect" function that we can use to first redirect the navigation to
a new location immediately before committing it.

The commit operation is not synchronous because the API waits for all
precommitHandlers to resolve. This commit adds a small bit of handling
to account for this so that the Router's transition does not advance
to the next stage until the URL has been committed.
2026-01-09 10:31:26 -08:00
..
duplicate_in_flight_navigations.spec.ts refactor(router): Add support for precommitHandler in Navigation integration 2026-01-09 10:31:26 -08:00
eager_url_update_strategy.spec.ts build: move private testing helpers outside platform-browser/testing (#61472) 2025-05-20 10:00:43 +00:00
guards.spec.ts feat(router): Execute RunGuardsAndResolvers function in injection context 2025-11-20 17:05:10 -05:00
integration.spec.ts refactor(router): Add support for precommitHandler in Navigation integration 2026-01-09 10:31:26 -08:00
integration_helpers.ts ci: reformat files 2025-12-16 14:44:19 -08:00
lazy_loading.spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
navigation.spec.ts refactor(router): Add support for precommitHandler in Navigation integration 2026-01-09 10:31:26 -08:00
navigation_errors.spec.ts refactor(router): Build out integration with browser Navigation API (#64905) 2025-11-06 17:42:04 +00:00
redirects.spec.ts refactor(router): Build out integration with browser Navigation API (#64905) 2025-11-06 17:42:04 +00:00
route_data.spec.ts build: migrate router to use rules_js (#61542) 2025-05-21 09:53:34 +00:00
route_reuse_strategy.spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
router_events.spec.ts build: move private testing helpers outside platform-browser/testing (#61472) 2025-05-20 10:00:43 +00:00
router_link_active.spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00
router_links.spec.ts ci: reformat files 2025-12-16 14:44:19 -08:00