@angular/router 18.0.0-next.5 → 18.0.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/src/components/empty_outlet.mjs +3 -3
- package/esm2022/src/directives/router_link.mjs +3 -3
- package/esm2022/src/directives/router_link_active.mjs +3 -3
- package/esm2022/src/directives/router_outlet.mjs +25 -14
- package/esm2022/src/navigation_transition.mjs +18 -8
- package/esm2022/src/page_title_strategy.mjs +6 -6
- package/esm2022/src/provide_router.mjs +7 -1
- package/esm2022/src/route_reuse_strategy.mjs +6 -6
- package/esm2022/src/router.mjs +3 -3
- package/esm2022/src/router_config_loader.mjs +3 -3
- package/esm2022/src/router_module.mjs +4 -4
- package/esm2022/src/router_outlet_context.mjs +3 -3
- package/esm2022/src/router_preloader.mjs +9 -9
- package/esm2022/src/router_scroller.mjs +3 -3
- package/esm2022/src/statemanager/state_manager.mjs +6 -6
- package/esm2022/src/url_handling_strategy.mjs +6 -6
- package/esm2022/src/url_tree.mjs +3 -3
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/router_testing_harness.mjs +6 -6
- package/esm2022/testing/src/router_testing_module.mjs +4 -4
- package/fesm2022/router.mjs +147 -121
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +8 -2
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2022/router.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-next.
|
|
2
|
+
* @license Angular v18.0.0-next.6
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -421,10 +421,10 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
421
421
|
* @publicApi
|
|
422
422
|
*/
|
|
423
423
|
class UrlSerializer {
|
|
424
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
425
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
424
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
425
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }); }
|
|
426
426
|
}
|
|
427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
428
428
|
type: Injectable,
|
|
429
429
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
430
430
|
}] });
|
|
@@ -1857,10 +1857,10 @@ class ChildrenOutletContexts {
|
|
|
1857
1857
|
getContext(childName) {
|
|
1858
1858
|
return this.contexts.get(childName) || null;
|
|
1859
1859
|
}
|
|
1860
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1861
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1860
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ChildrenOutletContexts, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1861
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' }); }
|
|
1862
1862
|
}
|
|
1863
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
1864
1864
|
type: Injectable,
|
|
1865
1865
|
args: [{ providedIn: 'root' }]
|
|
1866
1866
|
}], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
|
|
@@ -2568,10 +2568,10 @@ class RouterOutlet {
|
|
|
2568
2568
|
this.inputBinder?.bindActivatedRouteToOutletComponent(this);
|
|
2569
2569
|
this.activateEvents.emit(this.activated.instance);
|
|
2570
2570
|
}
|
|
2571
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2572
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
2571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2572
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 }); }
|
|
2573
2573
|
}
|
|
2574
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2575
2575
|
type: Directive,
|
|
2576
2576
|
args: [{
|
|
2577
2577
|
selector: 'router-outlet',
|
|
@@ -2594,17 +2594,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.5",
|
|
|
2594
2594
|
args: ['detach']
|
|
2595
2595
|
}] } });
|
|
2596
2596
|
class OutletInjector {
|
|
2597
|
+
/**
|
|
2598
|
+
* This injector has a special handing for the `ActivatedRoute` and
|
|
2599
|
+
* `ChildrenOutletContexts` tokens: it returns corresponding values for those
|
|
2600
|
+
* tokens dynamically. This behavior is different from the regular injector logic,
|
|
2601
|
+
* when we initialize and store a value, which is later returned for all inject
|
|
2602
|
+
* requests.
|
|
2603
|
+
*
|
|
2604
|
+
* In some cases (e.g. when using `@defer`), this dynamic behavior requires special
|
|
2605
|
+
* handling. This function allows to identify an instance of the `OutletInjector` and
|
|
2606
|
+
* create an instance of it without referring to the class itself (so this logic can
|
|
2607
|
+
* be invoked from the `core` package). This helps to retain dynamic behavior for the
|
|
2608
|
+
* mentioned tokens.
|
|
2609
|
+
*
|
|
2610
|
+
* Note: it's a temporary solution and we should explore how to support this case better.
|
|
2611
|
+
*/
|
|
2612
|
+
__ngOutletInjector(parentInjector) {
|
|
2613
|
+
return new OutletInjector(this.route, this.childContexts, parentInjector);
|
|
2614
|
+
}
|
|
2597
2615
|
constructor(route, childContexts, parent) {
|
|
2598
2616
|
this.route = route;
|
|
2599
2617
|
this.childContexts = childContexts;
|
|
2600
2618
|
this.parent = parent;
|
|
2601
|
-
/**
|
|
2602
|
-
* A special flag that allows to identify the `OutletInjector` without
|
|
2603
|
-
* referring to the class itself. This is required as a temporary solution,
|
|
2604
|
-
* to have a special handling for this injector in core. Eventually, this
|
|
2605
|
-
* injector should just become an `EnvironmentInjector` without special logic.
|
|
2606
|
-
*/
|
|
2607
|
-
this.__ngOutletInjector = true;
|
|
2608
2619
|
}
|
|
2609
2620
|
get(token, notFoundValue) {
|
|
2610
2621
|
if (token === ActivatedRoute) {
|
|
@@ -2683,10 +2694,10 @@ class RoutedComponentInputBinder {
|
|
|
2683
2694
|
});
|
|
2684
2695
|
this.outletDataSubscriptions.set(outlet, dataSubscription);
|
|
2685
2696
|
}
|
|
2686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2687
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2697
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2698
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RoutedComponentInputBinder }); }
|
|
2688
2699
|
}
|
|
2689
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{
|
|
2690
2701
|
type: Injectable
|
|
2691
2702
|
}] });
|
|
2692
2703
|
|
|
@@ -2732,6 +2743,44 @@ function createActivatedRoute(c) {
|
|
|
2732
2743
|
return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);
|
|
2733
2744
|
}
|
|
2734
2745
|
|
|
2746
|
+
/**
|
|
2747
|
+
* Can be returned by a `Router` guard to instruct the `Router` to redirect rather than continue
|
|
2748
|
+
* processing the path of the in-flight navigation. The `redirectTo` indicates _where_ the new
|
|
2749
|
+
* navigation should go to and the optional `navigationBehaviorOptions` can provide more information
|
|
2750
|
+
* about _how_ to perform the navigation.
|
|
2751
|
+
*
|
|
2752
|
+
* ```ts
|
|
2753
|
+
* const route: Route = {
|
|
2754
|
+
* path: "user/:userId",
|
|
2755
|
+
* component: User,
|
|
2756
|
+
* canActivate: [
|
|
2757
|
+
* () => {
|
|
2758
|
+
* const router = inject(Router);
|
|
2759
|
+
* const authService = inject(AuthenticationService);
|
|
2760
|
+
*
|
|
2761
|
+
* if (!authService.isLoggedIn()) {
|
|
2762
|
+
* const loginPath = router.parseUrl("/login");
|
|
2763
|
+
* return new RedirectCommand(loginPath, {
|
|
2764
|
+
* skipLocationChange: "true",
|
|
2765
|
+
* });
|
|
2766
|
+
* }
|
|
2767
|
+
*
|
|
2768
|
+
* return true;
|
|
2769
|
+
* },
|
|
2770
|
+
* ],
|
|
2771
|
+
* };
|
|
2772
|
+
* ```
|
|
2773
|
+
* @see [Routing guide](guide/routing/common-router-tasks#preventing-unauthorized-access)
|
|
2774
|
+
*
|
|
2775
|
+
* @publicApi
|
|
2776
|
+
*/
|
|
2777
|
+
class RedirectCommand {
|
|
2778
|
+
constructor(redirectTo, navigationBehaviorOptions) {
|
|
2779
|
+
this.redirectTo = redirectTo;
|
|
2780
|
+
this.navigationBehaviorOptions = navigationBehaviorOptions;
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2735
2784
|
const NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';
|
|
2736
2785
|
function redirectingNavigationError(urlSerializer, redirect) {
|
|
2737
2786
|
const { redirectTo, navigationBehaviorOptions } = isUrlTree(redirect)
|
|
@@ -2766,10 +2815,10 @@ function isNavigationCancelingError(error) {
|
|
|
2766
2815
|
* to this `EmptyOutletComponent`.
|
|
2767
2816
|
*/
|
|
2768
2817
|
class ɵEmptyOutletComponent {
|
|
2769
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2770
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
2818
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2819
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.6", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
2771
2820
|
}
|
|
2772
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2773
2822
|
type: Component,
|
|
2774
2823
|
args: [{
|
|
2775
2824
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -3336,44 +3385,6 @@ function isEmptyError(e) {
|
|
|
3336
3385
|
return e instanceof EmptyError || e?.name === 'EmptyError';
|
|
3337
3386
|
}
|
|
3338
3387
|
|
|
3339
|
-
/**
|
|
3340
|
-
* Can be returned by a `Router` guard to instruct the `Router` to redirect rather than continue
|
|
3341
|
-
* processing the path of the in-flight navigation. The `redirectTo` indicates _where_ the new
|
|
3342
|
-
* navigation should go to and the optional `navigationBehaviorOptions` can provide more information
|
|
3343
|
-
* about _how_ to perform the navigation.
|
|
3344
|
-
*
|
|
3345
|
-
* ```ts
|
|
3346
|
-
* const route: Route = {
|
|
3347
|
-
* path: "user/:userId",
|
|
3348
|
-
* component: User,
|
|
3349
|
-
* canActivate: [
|
|
3350
|
-
* () => {
|
|
3351
|
-
* const router = inject(Router);
|
|
3352
|
-
* const authService = inject(AuthenticationService);
|
|
3353
|
-
*
|
|
3354
|
-
* if (!authService.isLoggedIn()) {
|
|
3355
|
-
* const loginPath = router.parseUrl("/login");
|
|
3356
|
-
* return new RedirectCommand(loginPath, {
|
|
3357
|
-
* skipLocationChange: "true",
|
|
3358
|
-
* });
|
|
3359
|
-
* }
|
|
3360
|
-
*
|
|
3361
|
-
* return true;
|
|
3362
|
-
* },
|
|
3363
|
-
* ],
|
|
3364
|
-
* };
|
|
3365
|
-
* ```
|
|
3366
|
-
* @see [Routing guide](guide/routing/common-router-tasks#preventing-unauthorized-access)
|
|
3367
|
-
*
|
|
3368
|
-
* @publicApi
|
|
3369
|
-
*/
|
|
3370
|
-
class RedirectCommand {
|
|
3371
|
-
constructor(redirectTo, navigationBehaviorOptions) {
|
|
3372
|
-
this.redirectTo = redirectTo;
|
|
3373
|
-
this.navigationBehaviorOptions = navigationBehaviorOptions;
|
|
3374
|
-
}
|
|
3375
|
-
}
|
|
3376
|
-
|
|
3377
3388
|
const INITIAL_VALUE = /* @__PURE__ */ Symbol('INITIAL_VALUE');
|
|
3378
3389
|
function prioritizedGuardValue() {
|
|
3379
3390
|
return switchMap((obs) => {
|
|
@@ -4230,10 +4241,10 @@ class TitleStrategy {
|
|
|
4230
4241
|
getResolvedTitleForRoute(snapshot) {
|
|
4231
4242
|
return snapshot.data[RouteTitleKey];
|
|
4232
4243
|
}
|
|
4233
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4234
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4244
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4245
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }); }
|
|
4235
4246
|
}
|
|
4236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4237
4248
|
type: Injectable,
|
|
4238
4249
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4239
4250
|
}] });
|
|
@@ -4256,10 +4267,10 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4256
4267
|
this.title.setTitle(title);
|
|
4257
4268
|
}
|
|
4258
4269
|
}
|
|
4259
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4260
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4270
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4271
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' }); }
|
|
4261
4272
|
}
|
|
4262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4263
4274
|
type: Injectable,
|
|
4264
4275
|
args: [{ providedIn: 'root' }]
|
|
4265
4276
|
}], ctorParameters: () => [{ type: i1.Title }] });
|
|
@@ -4335,10 +4346,10 @@ class RouterConfigLoader {
|
|
|
4335
4346
|
this.childrenLoaders.set(route, loader);
|
|
4336
4347
|
return loader;
|
|
4337
4348
|
}
|
|
4338
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4339
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4349
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4350
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' }); }
|
|
4340
4351
|
}
|
|
4341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4342
4353
|
type: Injectable,
|
|
4343
4354
|
args: [{ providedIn: 'root' }]
|
|
4344
4355
|
}] });
|
|
@@ -4405,10 +4416,10 @@ function maybeUnwrapDefaultExport(input) {
|
|
|
4405
4416
|
* @publicApi
|
|
4406
4417
|
*/
|
|
4407
4418
|
class UrlHandlingStrategy {
|
|
4408
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4409
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4419
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4420
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }); }
|
|
4410
4421
|
}
|
|
4411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4412
4423
|
type: Injectable,
|
|
4413
4424
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4414
4425
|
}] });
|
|
@@ -4425,10 +4436,10 @@ class DefaultUrlHandlingStrategy {
|
|
|
4425
4436
|
merge(newUrlPart, wholeUrl) {
|
|
4426
4437
|
return newUrlPart;
|
|
4427
4438
|
}
|
|
4428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4429
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4439
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4440
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' }); }
|
|
4430
4441
|
}
|
|
4431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
4432
4443
|
type: Injectable,
|
|
4433
4444
|
args: [{ providedIn: 'root' }]
|
|
4434
4445
|
}] });
|
|
@@ -4803,11 +4814,20 @@ class NavigationTransitions {
|
|
|
4803
4814
|
}
|
|
4804
4815
|
else {
|
|
4805
4816
|
const navigationError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);
|
|
4806
|
-
this.events.next(navigationError);
|
|
4807
4817
|
try {
|
|
4808
|
-
runInInjectionContext(this.environmentInjector, () => this.navigationErrorHandler?.(navigationError));
|
|
4809
|
-
|
|
4810
|
-
|
|
4818
|
+
const navigationErrorHandlerResult = runInInjectionContext(this.environmentInjector, () => this.navigationErrorHandler?.(navigationError));
|
|
4819
|
+
if (navigationErrorHandlerResult instanceof RedirectCommand) {
|
|
4820
|
+
const { message, cancellationCode } = redirectingNavigationError(this.urlSerializer, navigationErrorHandlerResult);
|
|
4821
|
+
this.events.next(new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), message, cancellationCode));
|
|
4822
|
+
this.events.next(new RedirectRequest(navigationErrorHandlerResult.redirectTo, navigationErrorHandlerResult.navigationBehaviorOptions));
|
|
4823
|
+
}
|
|
4824
|
+
else {
|
|
4825
|
+
this.events.next(navigationError);
|
|
4826
|
+
// TODO(atscott): remove deprecation on errorHandler in RouterModule.forRoot and change behavior to provide NAVIGATION_ERROR_HANDLER
|
|
4827
|
+
// Note: Still remove public `Router.errorHandler` property, as this is supposed to be configured in DI.
|
|
4828
|
+
const errorHandlerResult = router.errorHandler(e);
|
|
4829
|
+
overallTransitionState.resolve(!!errorHandlerResult);
|
|
4830
|
+
}
|
|
4811
4831
|
}
|
|
4812
4832
|
catch (ee) {
|
|
4813
4833
|
// TODO(atscott): consider flipping the default behavior of
|
|
@@ -4864,10 +4884,10 @@ class NavigationTransitions {
|
|
|
4864
4884
|
return (extractedBrowserUrl.toString() !== this.currentTransition?.extractedUrl.toString() &&
|
|
4865
4885
|
!this.currentTransition?.extras.skipLocationChange);
|
|
4866
4886
|
}
|
|
4867
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4868
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4887
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4888
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NavigationTransitions, providedIn: 'root' }); }
|
|
4869
4889
|
}
|
|
4870
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
4871
4891
|
type: Injectable,
|
|
4872
4892
|
args: [{ providedIn: 'root' }]
|
|
4873
4893
|
}], ctorParameters: () => [] });
|
|
@@ -4883,10 +4903,10 @@ function isBrowserTriggeredNavigation(source) {
|
|
|
4883
4903
|
* @publicApi
|
|
4884
4904
|
*/
|
|
4885
4905
|
class RouteReuseStrategy {
|
|
4886
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4887
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4906
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4907
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }); }
|
|
4888
4908
|
}
|
|
4889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4909
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
4890
4910
|
type: Injectable,
|
|
4891
4911
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4892
4912
|
}] });
|
|
@@ -4937,19 +4957,19 @@ class BaseRouteReuseStrategy {
|
|
|
4937
4957
|
}
|
|
4938
4958
|
}
|
|
4939
4959
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4940
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4941
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4960
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4961
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' }); }
|
|
4942
4962
|
}
|
|
4943
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4963
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
4944
4964
|
type: Injectable,
|
|
4945
4965
|
args: [{ providedIn: 'root' }]
|
|
4946
4966
|
}] });
|
|
4947
4967
|
|
|
4948
4968
|
class StateManager {
|
|
4949
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4950
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4969
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: StateManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4970
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: StateManager, providedIn: 'root', useFactory: () => inject(HistoryStateManager) }); }
|
|
4951
4971
|
}
|
|
4952
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: StateManager, decorators: [{
|
|
4953
4973
|
type: Injectable,
|
|
4954
4974
|
args: [{ providedIn: 'root', useFactory: () => inject(HistoryStateManager) }]
|
|
4955
4975
|
}] });
|
|
@@ -5124,10 +5144,10 @@ class HistoryStateManager extends StateManager {
|
|
|
5124
5144
|
}
|
|
5125
5145
|
return { navigationId };
|
|
5126
5146
|
}
|
|
5127
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5128
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: HistoryStateManager, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5148
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: HistoryStateManager, providedIn: 'root' }); }
|
|
5129
5149
|
}
|
|
5130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: HistoryStateManager, decorators: [{
|
|
5131
5151
|
type: Injectable,
|
|
5132
5152
|
args: [{ providedIn: 'root' }]
|
|
5133
5153
|
}] });
|
|
@@ -5700,10 +5720,10 @@ class Router {
|
|
|
5700
5720
|
return Promise.reject(e);
|
|
5701
5721
|
});
|
|
5702
5722
|
}
|
|
5703
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5704
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5723
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5724
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: Router, providedIn: 'root' }); }
|
|
5705
5725
|
}
|
|
5706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: Router, decorators: [{
|
|
5707
5727
|
type: Injectable,
|
|
5708
5728
|
args: [{ providedIn: 'root' }]
|
|
5709
5729
|
}], ctorParameters: () => [] });
|
|
@@ -5978,10 +5998,10 @@ class RouterLink {
|
|
|
5978
5998
|
preserveFragment: this.preserveFragment,
|
|
5979
5999
|
});
|
|
5980
6000
|
}
|
|
5981
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5982
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.
|
|
6001
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6002
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.6", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", info: "info", relativeTo: "relativeTo", preserveFragment: ["preserveFragment", "preserveFragment", booleanAttribute], skipLocationChange: ["skipLocationChange", "skipLocationChange", booleanAttribute], replaceUrl: ["replaceUrl", "replaceUrl", booleanAttribute], routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target" } }, usesOnChanges: true, ngImport: i0 }); }
|
|
5983
6003
|
}
|
|
5984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterLink, decorators: [{
|
|
5985
6005
|
type: Directive,
|
|
5986
6006
|
args: [{
|
|
5987
6007
|
selector: '[routerLink]',
|
|
@@ -6219,10 +6239,10 @@ class RouterLinkActive {
|
|
|
6219
6239
|
const isActiveCheckFn = this.isLinkActive(this.router);
|
|
6220
6240
|
return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);
|
|
6221
6241
|
}
|
|
6222
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6223
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6243
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 }); }
|
|
6224
6244
|
}
|
|
6225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6226
6246
|
type: Directive,
|
|
6227
6247
|
args: [{
|
|
6228
6248
|
selector: '[routerLinkActive]',
|
|
@@ -6274,10 +6294,10 @@ class PreloadAllModules {
|
|
|
6274
6294
|
preload(route, fn) {
|
|
6275
6295
|
return fn().pipe(catchError(() => of(null)));
|
|
6276
6296
|
}
|
|
6277
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6278
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6297
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6298
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: PreloadAllModules, providedIn: 'root' }); }
|
|
6279
6299
|
}
|
|
6280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6281
6301
|
type: Injectable,
|
|
6282
6302
|
args: [{ providedIn: 'root' }]
|
|
6283
6303
|
}] });
|
|
@@ -6294,10 +6314,10 @@ class NoPreloading {
|
|
|
6294
6314
|
preload(route, fn) {
|
|
6295
6315
|
return of(null);
|
|
6296
6316
|
}
|
|
6297
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6298
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6318
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NoPreloading, providedIn: 'root' }); }
|
|
6299
6319
|
}
|
|
6300
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6301
6321
|
type: Injectable,
|
|
6302
6322
|
args: [{ providedIn: 'root' }]
|
|
6303
6323
|
}] });
|
|
@@ -6388,10 +6408,10 @@ class RouterPreloader {
|
|
|
6388
6408
|
}
|
|
6389
6409
|
});
|
|
6390
6410
|
}
|
|
6391
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6392
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6411
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6412
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterPreloader, providedIn: 'root' }); }
|
|
6393
6413
|
}
|
|
6394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6395
6415
|
type: Injectable,
|
|
6396
6416
|
args: [{ providedIn: 'root' }]
|
|
6397
6417
|
}], ctorParameters: () => [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }] });
|
|
@@ -6484,10 +6504,10 @@ class RouterScroller {
|
|
|
6484
6504
|
this.routerEventsSubscription?.unsubscribe();
|
|
6485
6505
|
this.scrollEventsSubscription?.unsubscribe();
|
|
6486
6506
|
}
|
|
6487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6488
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6508
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterScroller }); }
|
|
6489
6509
|
}
|
|
6490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6491
6511
|
type: Injectable
|
|
6492
6512
|
}], ctorParameters: () => [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }] });
|
|
6493
6513
|
|
|
@@ -6914,6 +6934,12 @@ function withHashLocation() {
|
|
|
6914
6934
|
* This function is run inside application's [injection context](guide/di/dependency-injection-context)
|
|
6915
6935
|
* so you can use the [`inject`](api/core/inject) function.
|
|
6916
6936
|
*
|
|
6937
|
+
* This function can return a `RedirectCommand` to convert the error to a redirect, similar to returning
|
|
6938
|
+
* a `UrlTree` or `RedirectCommand` from a guard. This will also prevent the `Router` from emitting
|
|
6939
|
+
* `NavigationError`; it will instead emit `NavigationCancel` with code NavigationCancellationCode.Redirect.
|
|
6940
|
+
* Return values other than `RedirectCommand` are ignored and do not change any behavior with respect to
|
|
6941
|
+
* how the `Router` handles the error.
|
|
6942
|
+
*
|
|
6917
6943
|
* @usageNotes
|
|
6918
6944
|
*
|
|
6919
6945
|
* Basic example of how you can use the error handler option:
|
|
@@ -7128,11 +7154,11 @@ class RouterModule {
|
|
|
7128
7154
|
providers: [{ provide: ROUTES, multi: true, useValue: routes }],
|
|
7129
7155
|
};
|
|
7130
7156
|
}
|
|
7131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7132
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
7133
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7157
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7158
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] }); }
|
|
7159
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterModule }); }
|
|
7134
7160
|
}
|
|
7135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RouterModule, decorators: [{
|
|
7136
7162
|
type: NgModule,
|
|
7137
7163
|
args: [{
|
|
7138
7164
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7277,7 +7303,7 @@ function mapToResolve(provider) {
|
|
|
7277
7303
|
/**
|
|
7278
7304
|
* @publicApi
|
|
7279
7305
|
*/
|
|
7280
|
-
const VERSION = new Version('18.0.0-next.
|
|
7306
|
+
const VERSION = new Version('18.0.0-next.6');
|
|
7281
7307
|
|
|
7282
7308
|
/**
|
|
7283
7309
|
* @module
|