@@ -34,40 +34,6 @@ export function provideRouterHistoryStore(): Provider[] {
34
34
] ;
35
35
}
36
36
37
- // TODO(@LayZeeDK): Handle `NavigationCancel` and `NavigationError` events
38
- // NavigationStart -> NavigationEnd | NavigationCancel | NavigationError
39
- // NavigationSkipped -> (end)
40
- //
41
- // NavigationError resets the URL to what it was before the navigation that caused an error. No new *navigation* is triggered.
42
- // NavigationError reasons:
43
- // - Invalid route path
44
- // NavigationError(id: 3, url: '/an-invalid/path', error: Error: Cannot match any routes. URL Segment: 'an-invalid/path')
45
- // - Router resolver throws
46
- // - Route matcher throws
47
- // - Routed component throws in constructor (or a lifecycle hook?)
48
- // - Lazy route chunk file is not found (bundles updated and the user needs to refresh)
49
- // RouterTestingModule.withRoutes([
50
- // {
51
- // path: 'stale-chunk',
52
- // loadChildren: () =>
53
- // Promise.reject({ name: 'ChunkLoadError', message: 'ChunkLoadError' }),
54
- // // or () => { throw { name: 'ChunkLoadError', message: 'ChunkLoadError' }; }
55
- // },
56
- // ]),
57
- //
58
- // What is the URL after each of the following reasons?
59
- // NavigationCancel reasons:
60
- // NavigationCancel#code: NavigationCancellationCode
61
- // - GuardRejected: A navigation failed because a guard returned `false`.
62
- // - NoDataFromResolver: A navigation failed because one of the resolvers completed without emiting a value.
63
- // - Redirect: A navigation failed because a guard returned a `UrlTree` to redirect.
64
- // - SupersededByNewNavigation: A navigation failed because a more recent navigation started.
65
- // 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.
70
-
71
37
@Injectable ( )
72
38
export class RouterHistoryStore extends ComponentStore < RouterHistoryState > {
73
39
#router = inject ( Router ) ;
0 commit comments