@angular/router 18.0.0-next.1 → 18.0.0-next.3
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 +19 -18
- package/esm2022/src/directives/router_outlet.mjs +16 -10
- package/esm2022/src/models.mjs +1 -1
- package/esm2022/src/navigation_transition.mjs +16 -11
- package/esm2022/src/operators/activate_routes.mjs +2 -2
- package/esm2022/src/operators/resolve_data.mjs +7 -1
- package/esm2022/src/page_title_strategy.mjs +6 -6
- package/esm2022/src/provide_router.mjs +9 -18
- package/esm2022/src/route_reuse_strategy.mjs +6 -6
- package/esm2022/src/router.mjs +8 -7
- package/esm2022/src/router_config.mjs +2 -2
- package/esm2022/src/router_config_loader.mjs +5 -5
- package/esm2022/src/router_module.mjs +6 -6
- package/esm2022/src/router_outlet_context.mjs +13 -11
- 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 +131 -122
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +20 -13
- 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,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-next.
|
|
2
|
+
* @license Angular v18.0.0-next.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import { ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef,
|
|
8
|
+
import { ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, Directive, Input, Output, InjectionToken, reflectComponentType, Component, createEnvironmentInjector, ɵisNgModule, isStandalone, ɵisInjectable, runInInjectionContext, Compiler, NgModuleFactory, NgZone, afterNextRender, EnvironmentInjector, ɵConsole, ɵPendingTasks, ɵɵsanitizeUrlOrResourceUrl, booleanAttribute, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, InjectFlags, APP_INITIALIZER, SkipSelf, NgModule, Inject, Version } from '@angular/core';
|
|
9
9
|
import { isObservable, from, of, BehaviorSubject, combineLatest, EmptyError, concat, defer, pipe, throwError, EMPTY, ConnectableObservable, Subject, Subscription } from 'rxjs';
|
|
10
10
|
import * as i3 from '@angular/common';
|
|
11
11
|
import { DOCUMENT, Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
|
|
@@ -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.3", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
425
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", 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.3", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
428
428
|
type: Injectable,
|
|
429
429
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
430
430
|
}] });
|
|
@@ -1796,11 +1796,11 @@ function stringifyEvent(routerEvent) {
|
|
|
1796
1796
|
* @publicApi
|
|
1797
1797
|
*/
|
|
1798
1798
|
class OutletContext {
|
|
1799
|
-
constructor() {
|
|
1799
|
+
constructor(injector) {
|
|
1800
|
+
this.injector = injector;
|
|
1800
1801
|
this.outlet = null;
|
|
1801
1802
|
this.route = null;
|
|
1802
|
-
this.
|
|
1803
|
-
this.children = new ChildrenOutletContexts();
|
|
1803
|
+
this.children = new ChildrenOutletContexts(this.injector);
|
|
1804
1804
|
this.attachRef = null;
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
@@ -1810,7 +1810,9 @@ class OutletContext {
|
|
|
1810
1810
|
* @publicApi
|
|
1811
1811
|
*/
|
|
1812
1812
|
class ChildrenOutletContexts {
|
|
1813
|
-
|
|
1813
|
+
/** @nodoc */
|
|
1814
|
+
constructor(parentInjector) {
|
|
1815
|
+
this.parentInjector = parentInjector;
|
|
1814
1816
|
// contexts for child outlets, by name.
|
|
1815
1817
|
this.contexts = new Map();
|
|
1816
1818
|
}
|
|
@@ -1847,7 +1849,7 @@ class ChildrenOutletContexts {
|
|
|
1847
1849
|
getOrCreateContext(childName) {
|
|
1848
1850
|
let context = this.getContext(childName);
|
|
1849
1851
|
if (!context) {
|
|
1850
|
-
context = new OutletContext();
|
|
1852
|
+
context = new OutletContext(this.parentInjector);
|
|
1851
1853
|
this.contexts.set(childName, context);
|
|
1852
1854
|
}
|
|
1853
1855
|
return context;
|
|
@@ -1855,13 +1857,13 @@ class ChildrenOutletContexts {
|
|
|
1855
1857
|
getContext(childName) {
|
|
1856
1858
|
return this.contexts.get(childName) || null;
|
|
1857
1859
|
}
|
|
1858
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1859
|
-
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.3", 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.3", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' }); }
|
|
1860
1862
|
}
|
|
1861
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
1862
1864
|
type: Injectable,
|
|
1863
1865
|
args: [{ providedIn: 'root' }]
|
|
1864
|
-
}] });
|
|
1866
|
+
}], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
|
|
1865
1867
|
|
|
1866
1868
|
class Tree {
|
|
1867
1869
|
constructor(root) {
|
|
@@ -2432,7 +2434,6 @@ class RouterOutlet {
|
|
|
2432
2434
|
this.parentContexts = inject(ChildrenOutletContexts);
|
|
2433
2435
|
this.location = inject(ViewContainerRef);
|
|
2434
2436
|
this.changeDetector = inject(ChangeDetectorRef);
|
|
2435
|
-
this.environmentInjector = inject(EnvironmentInjector);
|
|
2436
2437
|
this.inputBinder = inject(INPUT_BINDER, { optional: true });
|
|
2437
2438
|
/** @nodoc */
|
|
2438
2439
|
this.supportsBindingToComponentInputs = true;
|
|
@@ -2562,7 +2563,7 @@ class RouterOutlet {
|
|
|
2562
2563
|
this.activated = location.createComponent(component, {
|
|
2563
2564
|
index: location.length,
|
|
2564
2565
|
injector,
|
|
2565
|
-
environmentInjector: environmentInjector
|
|
2566
|
+
environmentInjector: environmentInjector,
|
|
2566
2567
|
});
|
|
2567
2568
|
// Calling `markForCheck` to make sure we will run the change detection when the
|
|
2568
2569
|
// `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.
|
|
@@ -2570,10 +2571,10 @@ class RouterOutlet {
|
|
|
2570
2571
|
this.inputBinder?.bindActivatedRouteToOutletComponent(this);
|
|
2571
2572
|
this.activateEvents.emit(this.activated.instance);
|
|
2572
2573
|
}
|
|
2573
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2574
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
2574
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2575
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.3", 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 }); }
|
|
2575
2576
|
}
|
|
2576
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2577
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2577
2578
|
type: Directive,
|
|
2578
2579
|
args: [{
|
|
2579
2580
|
selector: 'router-outlet',
|
|
@@ -2600,6 +2601,13 @@ class OutletInjector {
|
|
|
2600
2601
|
this.route = route;
|
|
2601
2602
|
this.childContexts = childContexts;
|
|
2602
2603
|
this.parent = parent;
|
|
2604
|
+
/**
|
|
2605
|
+
* A special flag that allows to identify the `OutletInjector` without
|
|
2606
|
+
* referring to the class itself. This is required as a temporary solution,
|
|
2607
|
+
* to have a special handling for this injector in core. Eventually, this
|
|
2608
|
+
* injector should just become an `EnvironmentInjector` without special logic.
|
|
2609
|
+
*/
|
|
2610
|
+
this.__ngOutletInjector = true;
|
|
2603
2611
|
}
|
|
2604
2612
|
get(token, notFoundValue) {
|
|
2605
2613
|
if (token === ActivatedRoute) {
|
|
@@ -2678,10 +2686,10 @@ class RoutedComponentInputBinder {
|
|
|
2678
2686
|
});
|
|
2679
2687
|
this.outletDataSubscriptions.set(outlet, dataSubscription);
|
|
2680
2688
|
}
|
|
2681
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2682
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2689
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2690
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RoutedComponentInputBinder }); }
|
|
2683
2691
|
}
|
|
2684
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{
|
|
2685
2693
|
type: Injectable
|
|
2686
2694
|
}] });
|
|
2687
2695
|
|
|
@@ -2761,10 +2769,10 @@ function isNavigationCancelingError(error) {
|
|
|
2761
2769
|
* to this `EmptyOutletComponent`.
|
|
2762
2770
|
*/
|
|
2763
2771
|
class ɵEmptyOutletComponent {
|
|
2764
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2765
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
2772
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2773
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.0-next.3", 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"] }] }); }
|
|
2766
2774
|
}
|
|
2767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2768
2776
|
type: Component,
|
|
2769
2777
|
args: [{
|
|
2770
2778
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -3122,7 +3130,7 @@ class ActivateRoutes {
|
|
|
3122
3130
|
const injector = getClosestRouteInjector(future.snapshot);
|
|
3123
3131
|
context.attachRef = null;
|
|
3124
3132
|
context.route = future;
|
|
3125
|
-
context.injector = injector;
|
|
3133
|
+
context.injector = injector ?? context.injector;
|
|
3126
3134
|
if (context.outlet) {
|
|
3127
3135
|
// Activate the outlet when it has already been instantiated
|
|
3128
3136
|
// Otherwise it will get activated from its `ngOnInit` when instantiated
|
|
@@ -4129,6 +4137,9 @@ function resolveNode(resolve, futureARS, futureRSS, injector) {
|
|
|
4129
4137
|
}
|
|
4130
4138
|
const data = {};
|
|
4131
4139
|
return from(keys).pipe(mergeMap((key) => getResolver(resolve[key], futureARS, futureRSS, injector).pipe(first(), tap((value) => {
|
|
4140
|
+
if (value instanceof RedirectCommand) {
|
|
4141
|
+
throw redirectingNavigationError(new DefaultUrlSerializer(), value);
|
|
4142
|
+
}
|
|
4132
4143
|
data[key] = value;
|
|
4133
4144
|
}))), takeLast(1), mapTo(data), catchError((e) => (isEmptyError(e) ? EMPTY : throwError(e))));
|
|
4134
4145
|
}
|
|
@@ -4200,10 +4211,10 @@ class TitleStrategy {
|
|
|
4200
4211
|
getResolvedTitleForRoute(snapshot) {
|
|
4201
4212
|
return snapshot.data[RouteTitleKey];
|
|
4202
4213
|
}
|
|
4203
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4204
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4214
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4215
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }); }
|
|
4205
4216
|
}
|
|
4206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4207
4218
|
type: Injectable,
|
|
4208
4219
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4209
4220
|
}] });
|
|
@@ -4226,16 +4237,16 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4226
4237
|
this.title.setTitle(title);
|
|
4227
4238
|
}
|
|
4228
4239
|
}
|
|
4229
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4230
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4241
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' }); }
|
|
4231
4242
|
}
|
|
4232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4233
4244
|
type: Injectable,
|
|
4234
4245
|
args: [{ providedIn: 'root' }]
|
|
4235
4246
|
}], ctorParameters: () => [{ type: i1.Title }] });
|
|
4236
4247
|
|
|
4237
4248
|
/**
|
|
4238
|
-
* A
|
|
4249
|
+
* A DI token for the router service.
|
|
4239
4250
|
*
|
|
4240
4251
|
* @publicApi
|
|
4241
4252
|
*/
|
|
@@ -4245,7 +4256,7 @@ const ROUTER_CONFIGURATION = new InjectionToken(typeof ngDevMode === 'undefined'
|
|
|
4245
4256
|
});
|
|
4246
4257
|
|
|
4247
4258
|
/**
|
|
4248
|
-
* The
|
|
4259
|
+
* The DI token for a router configuration.
|
|
4249
4260
|
*
|
|
4250
4261
|
* `ROUTES` is a low level API for router configuration via dependency injection.
|
|
4251
4262
|
*
|
|
@@ -4305,10 +4316,10 @@ class RouterConfigLoader {
|
|
|
4305
4316
|
this.childrenLoaders.set(route, loader);
|
|
4306
4317
|
return loader;
|
|
4307
4318
|
}
|
|
4308
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4309
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4319
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4320
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' }); }
|
|
4310
4321
|
}
|
|
4311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4312
4323
|
type: Injectable,
|
|
4313
4324
|
args: [{ providedIn: 'root' }]
|
|
4314
4325
|
}] });
|
|
@@ -4375,10 +4386,10 @@ function maybeUnwrapDefaultExport(input) {
|
|
|
4375
4386
|
* @publicApi
|
|
4376
4387
|
*/
|
|
4377
4388
|
class UrlHandlingStrategy {
|
|
4378
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4379
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4390
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }); }
|
|
4380
4391
|
}
|
|
4381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4382
4393
|
type: Injectable,
|
|
4383
4394
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4384
4395
|
}] });
|
|
@@ -4395,10 +4406,10 @@ class DefaultUrlHandlingStrategy {
|
|
|
4395
4406
|
merge(newUrlPart, wholeUrl) {
|
|
4396
4407
|
return newUrlPart;
|
|
4397
4408
|
}
|
|
4398
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4399
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4409
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4410
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' }); }
|
|
4400
4411
|
}
|
|
4401
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
4402
4413
|
type: Injectable,
|
|
4403
4414
|
args: [{ providedIn: 'root' }]
|
|
4404
4415
|
}] });
|
|
@@ -4449,6 +4460,7 @@ function createRenderPromise(injector) {
|
|
|
4449
4460
|
});
|
|
4450
4461
|
}
|
|
4451
4462
|
|
|
4463
|
+
const NAVIGATION_ERROR_HANDLER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'navigation error handler' : '');
|
|
4452
4464
|
class NavigationTransitions {
|
|
4453
4465
|
get hasRequestedNavigation() {
|
|
4454
4466
|
return this.navigationId !== 0;
|
|
@@ -4478,6 +4490,7 @@ class NavigationTransitions {
|
|
|
4478
4490
|
this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';
|
|
4479
4491
|
this.urlHandlingStrategy = inject(UrlHandlingStrategy);
|
|
4480
4492
|
this.createViewTransition = inject(CREATE_VIEW_TRANSITION, { optional: true });
|
|
4493
|
+
this.navigationErrorHandler = inject(NAVIGATION_ERROR_HANDLER, { optional: true });
|
|
4481
4494
|
this.navigationId = 0;
|
|
4482
4495
|
/**
|
|
4483
4496
|
* Hook that enables you to pause navigation after the preactivation phase.
|
|
@@ -4509,8 +4522,8 @@ class NavigationTransitions {
|
|
|
4509
4522
|
urlAfterRedirects: this.urlHandlingStrategy.extract(initialUrlTree),
|
|
4510
4523
|
rawUrl: initialUrlTree,
|
|
4511
4524
|
extras: {},
|
|
4512
|
-
resolve:
|
|
4513
|
-
reject:
|
|
4525
|
+
resolve: () => { },
|
|
4526
|
+
reject: () => { },
|
|
4514
4527
|
promise: Promise.resolve(true),
|
|
4515
4528
|
source: IMPERATIVE_NAVIGATION,
|
|
4516
4529
|
restoredState: null,
|
|
@@ -4565,7 +4578,7 @@ class NavigationTransitions {
|
|
|
4565
4578
|
? `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.`
|
|
4566
4579
|
: '';
|
|
4567
4580
|
this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.rawUrl), reason, NavigationSkippedCode.IgnoredSameUrlNavigation));
|
|
4568
|
-
t.resolve(
|
|
4581
|
+
t.resolve(false);
|
|
4569
4582
|
return EMPTY;
|
|
4570
4583
|
}
|
|
4571
4584
|
if (this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {
|
|
@@ -4625,7 +4638,7 @@ class NavigationTransitions {
|
|
|
4625
4638
|
` indicated neither the current URL ${t.currentRawUrl} nor target URL ${t.rawUrl} should be processed.`
|
|
4626
4639
|
: '';
|
|
4627
4640
|
this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, NavigationSkippedCode.IgnoredByUrlHandlingStrategy));
|
|
4628
|
-
t.resolve(
|
|
4641
|
+
t.resolve(false);
|
|
4629
4642
|
return EMPTY;
|
|
4630
4643
|
}
|
|
4631
4644
|
}),
|
|
@@ -4770,9 +4783,12 @@ class NavigationTransitions {
|
|
|
4770
4783
|
* to the pre-error state. */
|
|
4771
4784
|
}
|
|
4772
4785
|
else {
|
|
4773
|
-
|
|
4786
|
+
const navigationError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);
|
|
4787
|
+
this.events.next(navigationError);
|
|
4774
4788
|
try {
|
|
4775
|
-
|
|
4789
|
+
runInInjectionContext(this.environmentInjector, () => this.navigationErrorHandler?.(navigationError));
|
|
4790
|
+
const errorHandlerResult = router.errorHandler(e);
|
|
4791
|
+
overallTransitionState.resolve(!!errorHandlerResult);
|
|
4776
4792
|
}
|
|
4777
4793
|
catch (ee) {
|
|
4778
4794
|
// TODO(atscott): consider flipping the default behavior of
|
|
@@ -4829,10 +4845,10 @@ class NavigationTransitions {
|
|
|
4829
4845
|
return (extractedBrowserUrl.toString() !== this.currentTransition?.extractedUrl.toString() &&
|
|
4830
4846
|
!this.currentTransition?.extras.skipLocationChange);
|
|
4831
4847
|
}
|
|
4832
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4833
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4848
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4849
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: NavigationTransitions, providedIn: 'root' }); }
|
|
4834
4850
|
}
|
|
4835
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4851
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
4836
4852
|
type: Injectable,
|
|
4837
4853
|
args: [{ providedIn: 'root' }]
|
|
4838
4854
|
}], ctorParameters: () => [] });
|
|
@@ -4848,10 +4864,10 @@ function isBrowserTriggeredNavigation(source) {
|
|
|
4848
4864
|
* @publicApi
|
|
4849
4865
|
*/
|
|
4850
4866
|
class RouteReuseStrategy {
|
|
4851
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4852
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4867
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4868
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }); }
|
|
4853
4869
|
}
|
|
4854
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
4855
4871
|
type: Injectable,
|
|
4856
4872
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4857
4873
|
}] });
|
|
@@ -4902,19 +4918,19 @@ class BaseRouteReuseStrategy {
|
|
|
4902
4918
|
}
|
|
4903
4919
|
}
|
|
4904
4920
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4905
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4906
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4921
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4922
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' }); }
|
|
4907
4923
|
}
|
|
4908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4924
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
4909
4925
|
type: Injectable,
|
|
4910
4926
|
args: [{ providedIn: 'root' }]
|
|
4911
4927
|
}] });
|
|
4912
4928
|
|
|
4913
4929
|
class StateManager {
|
|
4914
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4915
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4930
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: StateManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4931
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: StateManager, providedIn: 'root', useFactory: () => inject(HistoryStateManager) }); }
|
|
4916
4932
|
}
|
|
4917
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: StateManager, decorators: [{
|
|
4918
4934
|
type: Injectable,
|
|
4919
4935
|
args: [{ providedIn: 'root', useFactory: () => inject(HistoryStateManager) }]
|
|
4920
4936
|
}] });
|
|
@@ -5089,10 +5105,10 @@ class HistoryStateManager extends StateManager {
|
|
|
5089
5105
|
}
|
|
5090
5106
|
return { navigationId };
|
|
5091
5107
|
}
|
|
5092
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5093
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: HistoryStateManager, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5109
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: HistoryStateManager, providedIn: 'root' }); }
|
|
5094
5110
|
}
|
|
5095
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: HistoryStateManager, decorators: [{
|
|
5096
5112
|
type: Injectable,
|
|
5097
5113
|
args: [{ providedIn: 'root' }]
|
|
5098
5114
|
}] });
|
|
@@ -5287,7 +5303,8 @@ class Router {
|
|
|
5287
5303
|
// updates or if the navigation was triggered by the browser (back
|
|
5288
5304
|
// button, URL bar, etc). We want to replace that item in history
|
|
5289
5305
|
// if the navigation is rejected.
|
|
5290
|
-
replaceUrl:
|
|
5306
|
+
replaceUrl: currentTransition.extras.replaceUrl ||
|
|
5307
|
+
this.urlUpdateStrategy === 'eager' ||
|
|
5291
5308
|
isBrowserTriggeredNavigation(currentTransition.source),
|
|
5292
5309
|
// allow developer to override default options with RedirectCommand
|
|
5293
5310
|
...opts,
|
|
@@ -5659,8 +5676,8 @@ class Router {
|
|
|
5659
5676
|
currentRawUrl: this.currentUrlTree,
|
|
5660
5677
|
rawUrl,
|
|
5661
5678
|
extras,
|
|
5662
|
-
resolve,
|
|
5663
|
-
reject,
|
|
5679
|
+
resolve: resolve,
|
|
5680
|
+
reject: reject,
|
|
5664
5681
|
promise,
|
|
5665
5682
|
currentSnapshot: this.routerState.snapshot,
|
|
5666
5683
|
currentRouterState: this.routerState,
|
|
@@ -5671,10 +5688,10 @@ class Router {
|
|
|
5671
5688
|
return Promise.reject(e);
|
|
5672
5689
|
});
|
|
5673
5690
|
}
|
|
5674
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5675
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5691
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5692
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: Router, providedIn: 'root' }); }
|
|
5676
5693
|
}
|
|
5677
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: Router, decorators: [{
|
|
5678
5695
|
type: Injectable,
|
|
5679
5696
|
args: [{ providedIn: 'root' }]
|
|
5680
5697
|
}], ctorParameters: () => [] });
|
|
@@ -5949,10 +5966,10 @@ class RouterLink {
|
|
|
5949
5966
|
preserveFragment: this.preserveFragment,
|
|
5950
5967
|
});
|
|
5951
5968
|
}
|
|
5952
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5953
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.
|
|
5969
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", 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 }); }
|
|
5970
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.0-next.3", 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 }); }
|
|
5954
5971
|
}
|
|
5955
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterLink, decorators: [{
|
|
5956
5973
|
type: Directive,
|
|
5957
5974
|
args: [{
|
|
5958
5975
|
selector: '[routerLink]',
|
|
@@ -6153,23 +6170,24 @@ class RouterLinkActive {
|
|
|
6153
6170
|
return;
|
|
6154
6171
|
queueMicrotask(() => {
|
|
6155
6172
|
const hasActiveLinks = this.hasActiveLinks();
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
this.classes.forEach((c) => {
|
|
6160
|
-
if (hasActiveLinks) {
|
|
6161
|
-
this.renderer.addClass(this.element.nativeElement, c);
|
|
6162
|
-
}
|
|
6163
|
-
else {
|
|
6164
|
-
this.renderer.removeClass(this.element.nativeElement, c);
|
|
6165
|
-
}
|
|
6166
|
-
});
|
|
6167
|
-
if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {
|
|
6168
|
-
this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());
|
|
6173
|
+
this.classes.forEach((c) => {
|
|
6174
|
+
if (hasActiveLinks) {
|
|
6175
|
+
this.renderer.addClass(this.element.nativeElement, c);
|
|
6169
6176
|
}
|
|
6170
6177
|
else {
|
|
6171
|
-
this.renderer.
|
|
6178
|
+
this.renderer.removeClass(this.element.nativeElement, c);
|
|
6172
6179
|
}
|
|
6180
|
+
});
|
|
6181
|
+
if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {
|
|
6182
|
+
this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());
|
|
6183
|
+
}
|
|
6184
|
+
else {
|
|
6185
|
+
this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');
|
|
6186
|
+
}
|
|
6187
|
+
// Only emit change if the active state changed.
|
|
6188
|
+
if (this._isActive !== hasActiveLinks) {
|
|
6189
|
+
this._isActive = hasActiveLinks;
|
|
6190
|
+
this.cdr.markForCheck();
|
|
6173
6191
|
// Emit on isActiveChange after classes are updated
|
|
6174
6192
|
this.isActiveChange.emit(hasActiveLinks);
|
|
6175
6193
|
}
|
|
@@ -6189,10 +6207,10 @@ class RouterLinkActive {
|
|
|
6189
6207
|
const isActiveCheckFn = this.isLinkActive(this.router);
|
|
6190
6208
|
return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);
|
|
6191
6209
|
}
|
|
6192
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6193
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6210
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6211
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.3", 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 }); }
|
|
6194
6212
|
}
|
|
6195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6196
6214
|
type: Directive,
|
|
6197
6215
|
args: [{
|
|
6198
6216
|
selector: '[routerLinkActive]',
|
|
@@ -6244,10 +6262,10 @@ class PreloadAllModules {
|
|
|
6244
6262
|
preload(route, fn) {
|
|
6245
6263
|
return fn().pipe(catchError(() => of(null)));
|
|
6246
6264
|
}
|
|
6247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6248
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6265
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6266
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: PreloadAllModules, providedIn: 'root' }); }
|
|
6249
6267
|
}
|
|
6250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6251
6269
|
type: Injectable,
|
|
6252
6270
|
args: [{ providedIn: 'root' }]
|
|
6253
6271
|
}] });
|
|
@@ -6264,10 +6282,10 @@ class NoPreloading {
|
|
|
6264
6282
|
preload(route, fn) {
|
|
6265
6283
|
return of(null);
|
|
6266
6284
|
}
|
|
6267
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6268
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6286
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: NoPreloading, providedIn: 'root' }); }
|
|
6269
6287
|
}
|
|
6270
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6271
6289
|
type: Injectable,
|
|
6272
6290
|
args: [{ providedIn: 'root' }]
|
|
6273
6291
|
}] });
|
|
@@ -6358,10 +6376,10 @@ class RouterPreloader {
|
|
|
6358
6376
|
}
|
|
6359
6377
|
});
|
|
6360
6378
|
}
|
|
6361
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6362
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6380
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterPreloader, providedIn: 'root' }); }
|
|
6363
6381
|
}
|
|
6364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6365
6383
|
type: Injectable,
|
|
6366
6384
|
args: [{ providedIn: 'root' }]
|
|
6367
6385
|
}], ctorParameters: () => [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }] });
|
|
@@ -6454,10 +6472,10 @@ class RouterScroller {
|
|
|
6454
6472
|
this.routerEventsSubscription?.unsubscribe();
|
|
6455
6473
|
this.scrollEventsSubscription?.unsubscribe();
|
|
6456
6474
|
}
|
|
6457
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6458
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6475
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6476
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterScroller }); }
|
|
6459
6477
|
}
|
|
6460
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6461
6479
|
type: Injectable
|
|
6462
6480
|
}], ctorParameters: () => [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }] });
|
|
6463
6481
|
|
|
@@ -6538,7 +6556,7 @@ const routerIsProvidedDevModeCheck = {
|
|
|
6538
6556
|
},
|
|
6539
6557
|
};
|
|
6540
6558
|
/**
|
|
6541
|
-
* Registers a
|
|
6559
|
+
* Registers a DI provider for a set of routes.
|
|
6542
6560
|
* @param routes The route configuration to provide.
|
|
6543
6561
|
*
|
|
6544
6562
|
* @usageNotes
|
|
@@ -6879,8 +6897,7 @@ function withHashLocation() {
|
|
|
6879
6897
|
return routerFeature(6 /* RouterFeatureKind.RouterHashLocationFeature */, providers);
|
|
6880
6898
|
}
|
|
6881
6899
|
/**
|
|
6882
|
-
*
|
|
6883
|
-
* `NavigationError` happens.
|
|
6900
|
+
* Provides a function which is called when a navigation error occurs.
|
|
6884
6901
|
*
|
|
6885
6902
|
* This function is run inside application's [injection context](guide/dependency-injection-context)
|
|
6886
6903
|
* so you can use the [`inject`](api/core/inject) function.
|
|
@@ -6908,19 +6925,11 @@ function withHashLocation() {
|
|
|
6908
6925
|
*
|
|
6909
6926
|
* @publicApi
|
|
6910
6927
|
*/
|
|
6911
|
-
function withNavigationErrorHandler(
|
|
6928
|
+
function withNavigationErrorHandler(handler) {
|
|
6912
6929
|
const providers = [
|
|
6913
6930
|
{
|
|
6914
|
-
provide:
|
|
6915
|
-
|
|
6916
|
-
useValue: () => {
|
|
6917
|
-
const injector = inject(EnvironmentInjector);
|
|
6918
|
-
inject(Router).events.subscribe((e) => {
|
|
6919
|
-
if (e instanceof NavigationError) {
|
|
6920
|
-
runInInjectionContext(injector, () => fn(e));
|
|
6921
|
-
}
|
|
6922
|
-
});
|
|
6923
|
-
},
|
|
6931
|
+
provide: NAVIGATION_ERROR_HANDLER,
|
|
6932
|
+
useValue: handler,
|
|
6924
6933
|
},
|
|
6925
6934
|
];
|
|
6926
6935
|
return routerFeature(7 /* RouterFeatureKind.NavigationErrorHandlerFeature */, providers);
|
|
@@ -7107,11 +7116,11 @@ class RouterModule {
|
|
|
7107
7116
|
providers: [{ provide: ROUTES, multi: true, useValue: routes }],
|
|
7108
7117
|
};
|
|
7109
7118
|
}
|
|
7110
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7111
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
7112
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7120
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] }); }
|
|
7121
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterModule }); }
|
|
7113
7122
|
}
|
|
7114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.3", ngImport: i0, type: RouterModule, decorators: [{
|
|
7115
7124
|
type: NgModule,
|
|
7116
7125
|
args: [{
|
|
7117
7126
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7172,7 +7181,7 @@ function provideInitialNavigation(config) {
|
|
|
7172
7181
|
}
|
|
7173
7182
|
// TODO(atscott): This should not be in the public API
|
|
7174
7183
|
/**
|
|
7175
|
-
* A
|
|
7184
|
+
* A DI token for the router initializer that
|
|
7176
7185
|
* is called after the app is bootstrapped.
|
|
7177
7186
|
*
|
|
7178
7187
|
* @publicApi
|
|
@@ -7256,7 +7265,7 @@ function mapToResolve(provider) {
|
|
|
7256
7265
|
/**
|
|
7257
7266
|
* @publicApi
|
|
7258
7267
|
*/
|
|
7259
|
-
const VERSION = new Version('18.0.0-next.
|
|
7268
|
+
const VERSION = new Version('18.0.0-next.3');
|
|
7260
7269
|
|
|
7261
7270
|
/**
|
|
7262
7271
|
* @module
|