Skip to content

Commit 61e229c

Browse files
committed
refactor: add notes on NavigationSkipped
1 parent f0b3924 commit 61e229c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/router-component-store/src/lib/router-history-store/router-history.store.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export function provideRouterHistoryStore(): Provider[] {
3636

3737
// TODO(@LayZeeDK): Handle `NavigationCancel` and `NavigationError` events
3838
// NavigationStart -> NavigationEnd | NavigationCancel | NavigationError
39+
// NavigationSkipped -> (end)
3940
//
4041
// NavigationError resets the URL to what it was before the navigation that caused an error. No new *navigation* is triggered.
4142
// NavigationError reasons:
@@ -62,6 +63,10 @@ export function provideRouterHistoryStore(): Provider[] {
6263
// - Redirect: A navigation failed because a guard returned a `UrlTree` to redirect.
6364
// - SupersededByNewNavigation: A navigation failed because a more recent navigation started.
6465
// NavigationCancel { id: 3, url: "/company", reason: "Navigation ID 3 is not equal to the current navigation id 4" }
66+
//
67+
// NavigationSkipped reasons:
68+
// - `location` change to unsupported URL. The `UrlHandlingStrategy` cannot process the current or the target URL.
69+
// - `onSameUrlNavigation` is set to `ignore` (the default) and the target URL is the same as the current URL.
6570

6671
@Injectable()
6772
export class RouterHistoryStore extends ComponentStore<RouterHistoryState> {

0 commit comments

Comments
 (0)