@angular/router 18.0.0-next.2 → 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 +3 -3
- package/esm2022/src/directives/router_outlet.mjs +9 -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 +6 -6
- 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 +107 -107
- 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',
|
|
@@ -2685,10 +2686,10 @@ class RoutedComponentInputBinder {
|
|
|
2685
2686
|
});
|
|
2686
2687
|
this.outletDataSubscriptions.set(outlet, dataSubscription);
|
|
2687
2688
|
}
|
|
2688
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2689
|
-
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 }); }
|
|
2690
2691
|
}
|
|
2691
|
-
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: [{
|
|
2692
2693
|
type: Injectable
|
|
2693
2694
|
}] });
|
|
2694
2695
|
|
|
@@ -2768,10 +2769,10 @@ function isNavigationCancelingError(error) {
|
|
|
2768
2769
|
* to this `EmptyOutletComponent`.
|
|
2769
2770
|
*/
|
|
2770
2771
|
class ɵEmptyOutletComponent {
|
|
2771
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
2772
|
-
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"] }] }); }
|
|
2773
2774
|
}
|
|
2774
|
-
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: [{
|
|
2775
2776
|
type: Component,
|
|
2776
2777
|
args: [{
|
|
2777
2778
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -3129,7 +3130,7 @@ class ActivateRoutes {
|
|
|
3129
3130
|
const injector = getClosestRouteInjector(future.snapshot);
|
|
3130
3131
|
context.attachRef = null;
|
|
3131
3132
|
context.route = future;
|
|
3132
|
-
context.injector = injector;
|
|
3133
|
+
context.injector = injector ?? context.injector;
|
|
3133
3134
|
if (context.outlet) {
|
|
3134
3135
|
// Activate the outlet when it has already been instantiated
|
|
3135
3136
|
// Otherwise it will get activated from its `ngOnInit` when instantiated
|
|
@@ -4136,6 +4137,9 @@ function resolveNode(resolve, futureARS, futureRSS, injector) {
|
|
|
4136
4137
|
}
|
|
4137
4138
|
const data = {};
|
|
4138
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
|
+
}
|
|
4139
4143
|
data[key] = value;
|
|
4140
4144
|
}))), takeLast(1), mapTo(data), catchError((e) => (isEmptyError(e) ? EMPTY : throwError(e))));
|
|
4141
4145
|
}
|
|
@@ -4207,10 +4211,10 @@ class TitleStrategy {
|
|
|
4207
4211
|
getResolvedTitleForRoute(snapshot) {
|
|
4208
4212
|
return snapshot.data[RouteTitleKey];
|
|
4209
4213
|
}
|
|
4210
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4211
|
-
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) }); }
|
|
4212
4216
|
}
|
|
4213
|
-
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: [{
|
|
4214
4218
|
type: Injectable,
|
|
4215
4219
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4216
4220
|
}] });
|
|
@@ -4233,16 +4237,16 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4233
4237
|
this.title.setTitle(title);
|
|
4234
4238
|
}
|
|
4235
4239
|
}
|
|
4236
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4237
|
-
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' }); }
|
|
4238
4242
|
}
|
|
4239
|
-
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: [{
|
|
4240
4244
|
type: Injectable,
|
|
4241
4245
|
args: [{ providedIn: 'root' }]
|
|
4242
4246
|
}], ctorParameters: () => [{ type: i1.Title }] });
|
|
4243
4247
|
|
|
4244
4248
|
/**
|
|
4245
|
-
* A
|
|
4249
|
+
* A DI token for the router service.
|
|
4246
4250
|
*
|
|
4247
4251
|
* @publicApi
|
|
4248
4252
|
*/
|
|
@@ -4252,7 +4256,7 @@ const ROUTER_CONFIGURATION = new InjectionToken(typeof ngDevMode === 'undefined'
|
|
|
4252
4256
|
});
|
|
4253
4257
|
|
|
4254
4258
|
/**
|
|
4255
|
-
* The
|
|
4259
|
+
* The DI token for a router configuration.
|
|
4256
4260
|
*
|
|
4257
4261
|
* `ROUTES` is a low level API for router configuration via dependency injection.
|
|
4258
4262
|
*
|
|
@@ -4312,10 +4316,10 @@ class RouterConfigLoader {
|
|
|
4312
4316
|
this.childrenLoaders.set(route, loader);
|
|
4313
4317
|
return loader;
|
|
4314
4318
|
}
|
|
4315
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4316
|
-
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' }); }
|
|
4317
4321
|
}
|
|
4318
|
-
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: [{
|
|
4319
4323
|
type: Injectable,
|
|
4320
4324
|
args: [{ providedIn: 'root' }]
|
|
4321
4325
|
}] });
|
|
@@ -4382,10 +4386,10 @@ function maybeUnwrapDefaultExport(input) {
|
|
|
4382
4386
|
* @publicApi
|
|
4383
4387
|
*/
|
|
4384
4388
|
class UrlHandlingStrategy {
|
|
4385
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4386
|
-
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) }); }
|
|
4387
4391
|
}
|
|
4388
|
-
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: [{
|
|
4389
4393
|
type: Injectable,
|
|
4390
4394
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4391
4395
|
}] });
|
|
@@ -4402,10 +4406,10 @@ class DefaultUrlHandlingStrategy {
|
|
|
4402
4406
|
merge(newUrlPart, wholeUrl) {
|
|
4403
4407
|
return newUrlPart;
|
|
4404
4408
|
}
|
|
4405
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4406
|
-
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' }); }
|
|
4407
4411
|
}
|
|
4408
|
-
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: [{
|
|
4409
4413
|
type: Injectable,
|
|
4410
4414
|
args: [{ providedIn: 'root' }]
|
|
4411
4415
|
}] });
|
|
@@ -4456,6 +4460,7 @@ function createRenderPromise(injector) {
|
|
|
4456
4460
|
});
|
|
4457
4461
|
}
|
|
4458
4462
|
|
|
4463
|
+
const NAVIGATION_ERROR_HANDLER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'navigation error handler' : '');
|
|
4459
4464
|
class NavigationTransitions {
|
|
4460
4465
|
get hasRequestedNavigation() {
|
|
4461
4466
|
return this.navigationId !== 0;
|
|
@@ -4485,6 +4490,7 @@ class NavigationTransitions {
|
|
|
4485
4490
|
this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';
|
|
4486
4491
|
this.urlHandlingStrategy = inject(UrlHandlingStrategy);
|
|
4487
4492
|
this.createViewTransition = inject(CREATE_VIEW_TRANSITION, { optional: true });
|
|
4493
|
+
this.navigationErrorHandler = inject(NAVIGATION_ERROR_HANDLER, { optional: true });
|
|
4488
4494
|
this.navigationId = 0;
|
|
4489
4495
|
/**
|
|
4490
4496
|
* Hook that enables you to pause navigation after the preactivation phase.
|
|
@@ -4516,8 +4522,8 @@ class NavigationTransitions {
|
|
|
4516
4522
|
urlAfterRedirects: this.urlHandlingStrategy.extract(initialUrlTree),
|
|
4517
4523
|
rawUrl: initialUrlTree,
|
|
4518
4524
|
extras: {},
|
|
4519
|
-
resolve:
|
|
4520
|
-
reject:
|
|
4525
|
+
resolve: () => { },
|
|
4526
|
+
reject: () => { },
|
|
4521
4527
|
promise: Promise.resolve(true),
|
|
4522
4528
|
source: IMPERATIVE_NAVIGATION,
|
|
4523
4529
|
restoredState: null,
|
|
@@ -4572,7 +4578,7 @@ class NavigationTransitions {
|
|
|
4572
4578
|
? `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.`
|
|
4573
4579
|
: '';
|
|
4574
4580
|
this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.rawUrl), reason, NavigationSkippedCode.IgnoredSameUrlNavigation));
|
|
4575
|
-
t.resolve(
|
|
4581
|
+
t.resolve(false);
|
|
4576
4582
|
return EMPTY;
|
|
4577
4583
|
}
|
|
4578
4584
|
if (this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {
|
|
@@ -4632,7 +4638,7 @@ class NavigationTransitions {
|
|
|
4632
4638
|
` indicated neither the current URL ${t.currentRawUrl} nor target URL ${t.rawUrl} should be processed.`
|
|
4633
4639
|
: '';
|
|
4634
4640
|
this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, NavigationSkippedCode.IgnoredByUrlHandlingStrategy));
|
|
4635
|
-
t.resolve(
|
|
4641
|
+
t.resolve(false);
|
|
4636
4642
|
return EMPTY;
|
|
4637
4643
|
}
|
|
4638
4644
|
}),
|
|
@@ -4777,9 +4783,12 @@ class NavigationTransitions {
|
|
|
4777
4783
|
* to the pre-error state. */
|
|
4778
4784
|
}
|
|
4779
4785
|
else {
|
|
4780
|
-
|
|
4786
|
+
const navigationError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);
|
|
4787
|
+
this.events.next(navigationError);
|
|
4781
4788
|
try {
|
|
4782
|
-
|
|
4789
|
+
runInInjectionContext(this.environmentInjector, () => this.navigationErrorHandler?.(navigationError));
|
|
4790
|
+
const errorHandlerResult = router.errorHandler(e);
|
|
4791
|
+
overallTransitionState.resolve(!!errorHandlerResult);
|
|
4783
4792
|
}
|
|
4784
4793
|
catch (ee) {
|
|
4785
4794
|
// TODO(atscott): consider flipping the default behavior of
|
|
@@ -4836,10 +4845,10 @@ class NavigationTransitions {
|
|
|
4836
4845
|
return (extractedBrowserUrl.toString() !== this.currentTransition?.extractedUrl.toString() &&
|
|
4837
4846
|
!this.currentTransition?.extras.skipLocationChange);
|
|
4838
4847
|
}
|
|
4839
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4840
|
-
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' }); }
|
|
4841
4850
|
}
|
|
4842
|
-
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: [{
|
|
4843
4852
|
type: Injectable,
|
|
4844
4853
|
args: [{ providedIn: 'root' }]
|
|
4845
4854
|
}], ctorParameters: () => [] });
|
|
@@ -4855,10 +4864,10 @@ function isBrowserTriggeredNavigation(source) {
|
|
|
4855
4864
|
* @publicApi
|
|
4856
4865
|
*/
|
|
4857
4866
|
class RouteReuseStrategy {
|
|
4858
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4859
|
-
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) }); }
|
|
4860
4869
|
}
|
|
4861
|
-
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: [{
|
|
4862
4871
|
type: Injectable,
|
|
4863
4872
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4864
4873
|
}] });
|
|
@@ -4909,19 +4918,19 @@ class BaseRouteReuseStrategy {
|
|
|
4909
4918
|
}
|
|
4910
4919
|
}
|
|
4911
4920
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4912
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4913
|
-
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' }); }
|
|
4914
4923
|
}
|
|
4915
|
-
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: [{
|
|
4916
4925
|
type: Injectable,
|
|
4917
4926
|
args: [{ providedIn: 'root' }]
|
|
4918
4927
|
}] });
|
|
4919
4928
|
|
|
4920
4929
|
class StateManager {
|
|
4921
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4922
|
-
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) }); }
|
|
4923
4932
|
}
|
|
4924
|
-
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: [{
|
|
4925
4934
|
type: Injectable,
|
|
4926
4935
|
args: [{ providedIn: 'root', useFactory: () => inject(HistoryStateManager) }]
|
|
4927
4936
|
}] });
|
|
@@ -5096,10 +5105,10 @@ class HistoryStateManager extends StateManager {
|
|
|
5096
5105
|
}
|
|
5097
5106
|
return { navigationId };
|
|
5098
5107
|
}
|
|
5099
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5100
|
-
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' }); }
|
|
5101
5110
|
}
|
|
5102
|
-
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: [{
|
|
5103
5112
|
type: Injectable,
|
|
5104
5113
|
args: [{ providedIn: 'root' }]
|
|
5105
5114
|
}] });
|
|
@@ -5667,8 +5676,8 @@ class Router {
|
|
|
5667
5676
|
currentRawUrl: this.currentUrlTree,
|
|
5668
5677
|
rawUrl,
|
|
5669
5678
|
extras,
|
|
5670
|
-
resolve,
|
|
5671
|
-
reject,
|
|
5679
|
+
resolve: resolve,
|
|
5680
|
+
reject: reject,
|
|
5672
5681
|
promise,
|
|
5673
5682
|
currentSnapshot: this.routerState.snapshot,
|
|
5674
5683
|
currentRouterState: this.routerState,
|
|
@@ -5679,10 +5688,10 @@ class Router {
|
|
|
5679
5688
|
return Promise.reject(e);
|
|
5680
5689
|
});
|
|
5681
5690
|
}
|
|
5682
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5683
|
-
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' }); }
|
|
5684
5693
|
}
|
|
5685
|
-
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: [{
|
|
5686
5695
|
type: Injectable,
|
|
5687
5696
|
args: [{ providedIn: 'root' }]
|
|
5688
5697
|
}], ctorParameters: () => [] });
|
|
@@ -5957,10 +5966,10 @@ class RouterLink {
|
|
|
5957
5966
|
preserveFragment: this.preserveFragment,
|
|
5958
5967
|
});
|
|
5959
5968
|
}
|
|
5960
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5961
|
-
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 }); }
|
|
5962
5971
|
}
|
|
5963
|
-
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: [{
|
|
5964
5973
|
type: Directive,
|
|
5965
5974
|
args: [{
|
|
5966
5975
|
selector: '[routerLink]',
|
|
@@ -6198,10 +6207,10 @@ class RouterLinkActive {
|
|
|
6198
6207
|
const isActiveCheckFn = this.isLinkActive(this.router);
|
|
6199
6208
|
return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);
|
|
6200
6209
|
}
|
|
6201
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6202
|
-
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 }); }
|
|
6203
6212
|
}
|
|
6204
|
-
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: [{
|
|
6205
6214
|
type: Directive,
|
|
6206
6215
|
args: [{
|
|
6207
6216
|
selector: '[routerLinkActive]',
|
|
@@ -6253,10 +6262,10 @@ class PreloadAllModules {
|
|
|
6253
6262
|
preload(route, fn) {
|
|
6254
6263
|
return fn().pipe(catchError(() => of(null)));
|
|
6255
6264
|
}
|
|
6256
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6257
|
-
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' }); }
|
|
6258
6267
|
}
|
|
6259
|
-
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: [{
|
|
6260
6269
|
type: Injectable,
|
|
6261
6270
|
args: [{ providedIn: 'root' }]
|
|
6262
6271
|
}] });
|
|
@@ -6273,10 +6282,10 @@ class NoPreloading {
|
|
|
6273
6282
|
preload(route, fn) {
|
|
6274
6283
|
return of(null);
|
|
6275
6284
|
}
|
|
6276
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6277
|
-
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' }); }
|
|
6278
6287
|
}
|
|
6279
|
-
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: [{
|
|
6280
6289
|
type: Injectable,
|
|
6281
6290
|
args: [{ providedIn: 'root' }]
|
|
6282
6291
|
}] });
|
|
@@ -6367,10 +6376,10 @@ class RouterPreloader {
|
|
|
6367
6376
|
}
|
|
6368
6377
|
});
|
|
6369
6378
|
}
|
|
6370
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6371
|
-
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' }); }
|
|
6372
6381
|
}
|
|
6373
|
-
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: [{
|
|
6374
6383
|
type: Injectable,
|
|
6375
6384
|
args: [{ providedIn: 'root' }]
|
|
6376
6385
|
}], ctorParameters: () => [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }] });
|
|
@@ -6463,10 +6472,10 @@ class RouterScroller {
|
|
|
6463
6472
|
this.routerEventsSubscription?.unsubscribe();
|
|
6464
6473
|
this.scrollEventsSubscription?.unsubscribe();
|
|
6465
6474
|
}
|
|
6466
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6467
|
-
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 }); }
|
|
6468
6477
|
}
|
|
6469
|
-
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: [{
|
|
6470
6479
|
type: Injectable
|
|
6471
6480
|
}], ctorParameters: () => [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }] });
|
|
6472
6481
|
|
|
@@ -6547,7 +6556,7 @@ const routerIsProvidedDevModeCheck = {
|
|
|
6547
6556
|
},
|
|
6548
6557
|
};
|
|
6549
6558
|
/**
|
|
6550
|
-
* Registers a
|
|
6559
|
+
* Registers a DI provider for a set of routes.
|
|
6551
6560
|
* @param routes The route configuration to provide.
|
|
6552
6561
|
*
|
|
6553
6562
|
* @usageNotes
|
|
@@ -6888,8 +6897,7 @@ function withHashLocation() {
|
|
|
6888
6897
|
return routerFeature(6 /* RouterFeatureKind.RouterHashLocationFeature */, providers);
|
|
6889
6898
|
}
|
|
6890
6899
|
/**
|
|
6891
|
-
*
|
|
6892
|
-
* `NavigationError` happens.
|
|
6900
|
+
* Provides a function which is called when a navigation error occurs.
|
|
6893
6901
|
*
|
|
6894
6902
|
* This function is run inside application's [injection context](guide/dependency-injection-context)
|
|
6895
6903
|
* so you can use the [`inject`](api/core/inject) function.
|
|
@@ -6917,19 +6925,11 @@ function withHashLocation() {
|
|
|
6917
6925
|
*
|
|
6918
6926
|
* @publicApi
|
|
6919
6927
|
*/
|
|
6920
|
-
function withNavigationErrorHandler(
|
|
6928
|
+
function withNavigationErrorHandler(handler) {
|
|
6921
6929
|
const providers = [
|
|
6922
6930
|
{
|
|
6923
|
-
provide:
|
|
6924
|
-
|
|
6925
|
-
useValue: () => {
|
|
6926
|
-
const injector = inject(EnvironmentInjector);
|
|
6927
|
-
inject(Router).events.subscribe((e) => {
|
|
6928
|
-
if (e instanceof NavigationError) {
|
|
6929
|
-
runInInjectionContext(injector, () => fn(e));
|
|
6930
|
-
}
|
|
6931
|
-
});
|
|
6932
|
-
},
|
|
6931
|
+
provide: NAVIGATION_ERROR_HANDLER,
|
|
6932
|
+
useValue: handler,
|
|
6933
6933
|
},
|
|
6934
6934
|
];
|
|
6935
6935
|
return routerFeature(7 /* RouterFeatureKind.NavigationErrorHandlerFeature */, providers);
|
|
@@ -7116,11 +7116,11 @@ class RouterModule {
|
|
|
7116
7116
|
providers: [{ provide: ROUTES, multi: true, useValue: routes }],
|
|
7117
7117
|
};
|
|
7118
7118
|
}
|
|
7119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7120
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
7121
|
-
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 }); }
|
|
7122
7122
|
}
|
|
7123
|
-
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: [{
|
|
7124
7124
|
type: NgModule,
|
|
7125
7125
|
args: [{
|
|
7126
7126
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7181,7 +7181,7 @@ function provideInitialNavigation(config) {
|
|
|
7181
7181
|
}
|
|
7182
7182
|
// TODO(atscott): This should not be in the public API
|
|
7183
7183
|
/**
|
|
7184
|
-
* A
|
|
7184
|
+
* A DI token for the router initializer that
|
|
7185
7185
|
* is called after the app is bootstrapped.
|
|
7186
7186
|
*
|
|
7187
7187
|
* @publicApi
|
|
@@ -7265,7 +7265,7 @@ function mapToResolve(provider) {
|
|
|
7265
7265
|
/**
|
|
7266
7266
|
* @publicApi
|
|
7267
7267
|
*/
|
|
7268
|
-
const VERSION = new Version('18.0.0-next.
|
|
7268
|
+
const VERSION = new Version('18.0.0-next.3');
|
|
7269
7269
|
|
|
7270
7270
|
/**
|
|
7271
7271
|
* @module
|