angular/packages/router
Andrew Scott 0bb4bd661e feat(router): Add ability to directly abort a navigation (#60380)
This commit adds the ability to directly abort a navigation through the
`Router.getCurrentNavigation()?.abort()` method. While there are no
feature requests for this, it is a feature that will be necessary for
integration with the navigation API. The API enables better tracking of
an ongoing navigation for SPAs and a site visitor can cancel a
navigation by clicking the stop button in the browser. While this could
technically be done on the transition with an internal jsdoc comment to
hide it from application developers, there's no need.

With this feature, I believe it would be possible to create somewhat of a shim
to integrate with the navigation API even before the router has full support
using the router events to control a deferred navigation that never
commits the URL and always aborts itself on navigation end.

PR Close #60380
2025-04-02 17:30:27 +00:00
..
scripts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
src feat(router): Add ability to directly abort a navigation (#60380) 2025-04-02 17:30:27 +00:00
test feat(router): Add ability to directly abort a navigation (#60380) 2025-04-02 17:30:27 +00:00
testing refactor(router): re-export the RouterTestingModule symbols (#60557) 2025-04-01 14:54:05 +00:00
upgrade refactor(router): switching to relative imports within the router package (#60557) 2025-04-01 14:54:05 +00:00
.gitignore refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
BUILD.bazel refactor(platform-server): Add an ssr benchmark setup. (#57647) 2024-10-04 10:45:22 -07:00
index.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
package.json feat(core): update Node.js version support (#60545) 2025-03-26 20:42:16 -07:00
PACKAGE.md docs: Use new Urls to drop the docs url mapper (#55043) 2024-04-09 12:23:09 -07:00
public_api.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
README.md docs(router): update link to development guide in README.md (#59388) 2025-01-09 10:29:38 -05:00

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 isnt 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.