@angular/router 19.1.0-next.4 → 19.1.0
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/LICENSE +1 -1
- package/fesm2022/router.mjs +93 -91
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/testing.mjs +11 -11
- package/fesm2022/upgrade.mjs +1 -1
- package/index.d.ts +15 -19
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2010-
|
|
3
|
+
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/fesm2022/router.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.1.0
|
|
2
|
+
* @license Angular v19.1.0
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -9,7 +9,7 @@ import { ɵisPromise, ɵRuntimeError, Injectable, createEnvironmentInjector, ɵi
|
|
|
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';
|
|
12
|
-
import { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, defaultIfEmpty, last as last$1, takeLast,
|
|
12
|
+
import { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, defaultIfEmpty, last as last$1, takeLast, finalize, refCount, takeUntil, mergeAll } from 'rxjs/operators';
|
|
13
13
|
import * as i1 from '@angular/platform-browser';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -433,10 +433,10 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
433
433
|
* @publicApi
|
|
434
434
|
*/
|
|
435
435
|
class UrlSerializer {
|
|
436
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
437
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
436
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
437
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
|
|
438
438
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
440
440
|
type: Injectable,
|
|
441
441
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
442
442
|
}] });
|
|
@@ -2123,10 +2123,10 @@ class ChildrenOutletContexts {
|
|
|
2123
2123
|
getContext(childName) {
|
|
2124
2124
|
return this.contexts.get(childName) || null;
|
|
2125
2125
|
}
|
|
2126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
2127
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
2126
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ChildrenOutletContexts, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2127
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
|
|
2128
2128
|
}
|
|
2129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
2129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
2130
2130
|
type: Injectable,
|
|
2131
2131
|
args: [{ providedIn: 'root' }]
|
|
2132
2132
|
}], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
|
|
@@ -2518,7 +2518,7 @@ class ActivatedRouteSnapshot {
|
|
|
2518
2518
|
* You can compute all params (or data) in the router state or to get params outside
|
|
2519
2519
|
* of an activated component by traversing the `RouterState` tree as in the following
|
|
2520
2520
|
* example:
|
|
2521
|
-
* ```
|
|
2521
|
+
* ```ts
|
|
2522
2522
|
* collectRouteParams(router: Router) {
|
|
2523
2523
|
* let params = {};
|
|
2524
2524
|
* let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];
|
|
@@ -2913,10 +2913,10 @@ class RouterOutlet {
|
|
|
2913
2913
|
this.inputBinder?.bindActivatedRouteToOutletComponent(this);
|
|
2914
2914
|
this.activateEvents.emit(this.activated.instance);
|
|
2915
2915
|
}
|
|
2916
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
2917
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.0
|
|
2916
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2917
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.0", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, routerOutletData: { classPropertyName: "routerOutletData", publicName: "routerOutletData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
|
|
2918
2918
|
}
|
|
2919
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
2919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2920
2920
|
type: Directive,
|
|
2921
2921
|
args: [{
|
|
2922
2922
|
selector: 'router-outlet',
|
|
@@ -3044,10 +3044,10 @@ class RoutedComponentInputBinder {
|
|
|
3044
3044
|
});
|
|
3045
3045
|
this.outletDataSubscriptions.set(outlet, dataSubscription);
|
|
3046
3046
|
}
|
|
3047
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
3048
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
3047
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3048
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RoutedComponentInputBinder });
|
|
3049
3049
|
}
|
|
3050
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
3050
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{
|
|
3051
3051
|
type: Injectable
|
|
3052
3052
|
}] });
|
|
3053
3053
|
|
|
@@ -4313,7 +4313,7 @@ function resolveNode(resolve, futureARS, futureRSS, injector) {
|
|
|
4313
4313
|
throw redirectingNavigationError(new DefaultUrlSerializer(), value);
|
|
4314
4314
|
}
|
|
4315
4315
|
data[key] = value;
|
|
4316
|
-
}))), takeLast(1),
|
|
4316
|
+
}))), takeLast(1), map(() => data), catchError((e) => (isEmptyError(e) ? EMPTY : throwError(e))));
|
|
4317
4317
|
}
|
|
4318
4318
|
function getResolver(injectionToken, futureARS, futureRSS, injector) {
|
|
4319
4319
|
const closestInjector = getClosestRouteInjector(futureARS) ?? injector;
|
|
@@ -4383,10 +4383,10 @@ class TitleStrategy {
|
|
|
4383
4383
|
getResolvedTitleForRoute(snapshot) {
|
|
4384
4384
|
return snapshot.data[RouteTitleKey];
|
|
4385
4385
|
}
|
|
4386
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
4387
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
4386
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4387
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
|
|
4388
4388
|
}
|
|
4389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
4389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4390
4390
|
type: Injectable,
|
|
4391
4391
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4392
4392
|
}] });
|
|
@@ -4410,10 +4410,10 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4410
4410
|
this.title.setTitle(title);
|
|
4411
4411
|
}
|
|
4412
4412
|
}
|
|
4413
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
4414
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
4413
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4414
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
4415
4415
|
}
|
|
4416
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
4416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4417
4417
|
type: Injectable,
|
|
4418
4418
|
args: [{ providedIn: 'root' }]
|
|
4419
4419
|
}], ctorParameters: () => [{ type: i1.Title }] });
|
|
@@ -4438,14 +4438,16 @@ const ROUTER_CONFIGURATION = new InjectionToken(typeof ngDevMode === 'undefined'
|
|
|
4438
4438
|
* to this `EmptyOutletComponent`.
|
|
4439
4439
|
*/
|
|
4440
4440
|
class ɵEmptyOutletComponent {
|
|
4441
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
4442
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0
|
|
4441
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4442
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", exportAs: ["emptyRouterOutlet"], ngImport: i0, template: `<router-outlet/>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
4443
4443
|
}
|
|
4444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
4444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
4445
4445
|
type: Component,
|
|
4446
4446
|
args: [{
|
|
4447
|
-
template: `<router-outlet
|
|
4447
|
+
template: `<router-outlet/>`,
|
|
4448
4448
|
imports: [RouterOutlet],
|
|
4449
|
+
// Used to avoid component ID collisions with user code.
|
|
4450
|
+
exportAs: 'emptyRouterOutlet',
|
|
4449
4451
|
}]
|
|
4450
4452
|
}] });
|
|
4451
4453
|
/**
|
|
@@ -4525,10 +4527,10 @@ class RouterConfigLoader {
|
|
|
4525
4527
|
this.childrenLoaders.set(route, loader);
|
|
4526
4528
|
return loader;
|
|
4527
4529
|
}
|
|
4528
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
4529
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
4530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4531
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
|
|
4530
4532
|
}
|
|
4531
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
4533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4532
4534
|
type: Injectable,
|
|
4533
4535
|
args: [{ providedIn: 'root' }]
|
|
4534
4536
|
}] });
|
|
@@ -4595,10 +4597,10 @@ function maybeUnwrapDefaultExport(input) {
|
|
|
4595
4597
|
* @publicApi
|
|
4596
4598
|
*/
|
|
4597
4599
|
class UrlHandlingStrategy {
|
|
4598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
4599
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
4600
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4601
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
|
|
4600
4602
|
}
|
|
4601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
4603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4602
4604
|
type: Injectable,
|
|
4603
4605
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4604
4606
|
}] });
|
|
@@ -4615,10 +4617,10 @@ class DefaultUrlHandlingStrategy {
|
|
|
4615
4617
|
merge(newUrlPart, wholeUrl) {
|
|
4616
4618
|
return newUrlPart;
|
|
4617
4619
|
}
|
|
4618
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
4619
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
4620
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4621
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
|
|
4620
4622
|
}
|
|
4621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
4623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
4622
4624
|
type: Injectable,
|
|
4623
4625
|
args: [{ providedIn: 'root' }]
|
|
4624
4626
|
}] });
|
|
@@ -5071,10 +5073,10 @@ class NavigationTransitions {
|
|
|
5071
5073
|
return (currentBrowserUrl.toString() !== targetBrowserUrl?.toString() &&
|
|
5072
5074
|
!this.currentNavigation?.extras.skipLocationChange);
|
|
5073
5075
|
}
|
|
5074
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
5075
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
5076
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5077
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
|
|
5076
5078
|
}
|
|
5077
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
5079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
5078
5080
|
type: Injectable,
|
|
5079
5081
|
args: [{ providedIn: 'root' }]
|
|
5080
5082
|
}], ctorParameters: () => [] });
|
|
@@ -5090,10 +5092,10 @@ function isBrowserTriggeredNavigation(source) {
|
|
|
5090
5092
|
* @publicApi
|
|
5091
5093
|
*/
|
|
5092
5094
|
class RouteReuseStrategy {
|
|
5093
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
5094
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
5095
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5096
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
|
|
5095
5097
|
}
|
|
5096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
5098
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
5097
5099
|
type: Injectable,
|
|
5098
5100
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
5099
5101
|
}] });
|
|
@@ -5144,19 +5146,19 @@ class BaseRouteReuseStrategy {
|
|
|
5144
5146
|
}
|
|
5145
5147
|
}
|
|
5146
5148
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
5147
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
5148
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
5149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5150
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
|
|
5149
5151
|
}
|
|
5150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
5152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
5151
5153
|
type: Injectable,
|
|
5152
5154
|
args: [{ providedIn: 'root' }]
|
|
5153
5155
|
}] });
|
|
5154
5156
|
|
|
5155
5157
|
class StateManager {
|
|
5156
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
5157
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
5158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: StateManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5159
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: StateManager, providedIn: 'root', useFactory: () => inject(HistoryStateManager) });
|
|
5158
5160
|
}
|
|
5159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
5161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: StateManager, decorators: [{
|
|
5160
5162
|
type: Injectable,
|
|
5161
5163
|
args: [{ providedIn: 'root', useFactory: () => inject(HistoryStateManager) }]
|
|
5162
5164
|
}] });
|
|
@@ -5326,20 +5328,14 @@ class HistoryStateManager extends StateManager {
|
|
|
5326
5328
|
}
|
|
5327
5329
|
return { navigationId };
|
|
5328
5330
|
}
|
|
5329
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
5330
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
5331
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: HistoryStateManager, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5332
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: HistoryStateManager, providedIn: 'root' });
|
|
5331
5333
|
}
|
|
5332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
5334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: HistoryStateManager, decorators: [{
|
|
5333
5335
|
type: Injectable,
|
|
5334
5336
|
args: [{ providedIn: 'root' }]
|
|
5335
5337
|
}] });
|
|
5336
5338
|
|
|
5337
|
-
var NavigationResult;
|
|
5338
|
-
(function (NavigationResult) {
|
|
5339
|
-
NavigationResult[NavigationResult["COMPLETE"] = 0] = "COMPLETE";
|
|
5340
|
-
NavigationResult[NavigationResult["FAILED"] = 1] = "FAILED";
|
|
5341
|
-
NavigationResult[NavigationResult["REDIRECTING"] = 2] = "REDIRECTING";
|
|
5342
|
-
})(NavigationResult || (NavigationResult = {}));
|
|
5343
5339
|
/**
|
|
5344
5340
|
* Performs the given action once the router finishes its next/current navigation.
|
|
5345
5341
|
*
|
|
@@ -5356,14 +5352,14 @@ function afterNextNavigation(router, action) {
|
|
|
5356
5352
|
e instanceof NavigationError ||
|
|
5357
5353
|
e instanceof NavigationSkipped), map((e) => {
|
|
5358
5354
|
if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {
|
|
5359
|
-
return NavigationResult.COMPLETE
|
|
5355
|
+
return 0 /* NavigationResult.COMPLETE */;
|
|
5360
5356
|
}
|
|
5361
5357
|
const redirecting = e instanceof NavigationCancel
|
|
5362
5358
|
? e.code === NavigationCancellationCode.Redirect ||
|
|
5363
5359
|
e.code === NavigationCancellationCode.SupersededByNewNavigation
|
|
5364
5360
|
: false;
|
|
5365
|
-
return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED
|
|
5366
|
-
}), filter((result) => result !== NavigationResult.REDIRECTING), take(1))
|
|
5361
|
+
return redirecting ? 2 /* NavigationResult.REDIRECTING */ : 1 /* NavigationResult.FAILED */;
|
|
5362
|
+
}), filter((result) => result !== 2 /* NavigationResult.REDIRECTING */), take(1))
|
|
5367
5363
|
.subscribe(() => {
|
|
5368
5364
|
action();
|
|
5369
5365
|
});
|
|
@@ -5629,7 +5625,7 @@ class Router {
|
|
|
5629
5625
|
*
|
|
5630
5626
|
* @usageNotes
|
|
5631
5627
|
*
|
|
5632
|
-
* ```
|
|
5628
|
+
* ```ts
|
|
5633
5629
|
* router.resetConfig([
|
|
5634
5630
|
* { path: 'team/:id', component: TeamCmp, children: [
|
|
5635
5631
|
* { path: 'simple', component: SimpleCmp },
|
|
@@ -5649,6 +5645,12 @@ class Router {
|
|
|
5649
5645
|
}
|
|
5650
5646
|
/** Disposes of the router. */
|
|
5651
5647
|
dispose() {
|
|
5648
|
+
// We call `unsubscribe()` to release observers, as users may forget to
|
|
5649
|
+
// unsubscribe manually when subscribing to `router.events`. We do not call
|
|
5650
|
+
// `complete()` because it is unsafe; if someone subscribes using the `first`
|
|
5651
|
+
// operator and the observable completes before emitting a value,
|
|
5652
|
+
// RxJS will throw an error.
|
|
5653
|
+
this._events.unsubscribe();
|
|
5652
5654
|
this.navigationTransitions.complete();
|
|
5653
5655
|
if (this.nonRouterCurrentEntryChangeSubscription) {
|
|
5654
5656
|
this.nonRouterCurrentEntryChangeSubscription.unsubscribe();
|
|
@@ -5761,7 +5763,7 @@ class Router {
|
|
|
5761
5763
|
*
|
|
5762
5764
|
* The following calls request navigation to an absolute path.
|
|
5763
5765
|
*
|
|
5764
|
-
* ```
|
|
5766
|
+
* ```ts
|
|
5765
5767
|
* router.navigateByUrl("/team/33/user/11");
|
|
5766
5768
|
*
|
|
5767
5769
|
* // Navigate without updating the URL
|
|
@@ -5798,7 +5800,7 @@ class Router {
|
|
|
5798
5800
|
*
|
|
5799
5801
|
* The following calls request navigation to a dynamic route path relative to the current URL.
|
|
5800
5802
|
*
|
|
5801
|
-
* ```
|
|
5803
|
+
* ```ts
|
|
5802
5804
|
* router.navigate(['team', 33, 'user', 11], {relativeTo: route});
|
|
5803
5805
|
*
|
|
5804
5806
|
* // Navigate without updating the URL, overriding the default behavior
|
|
@@ -5894,10 +5896,10 @@ class Router {
|
|
|
5894
5896
|
return Promise.reject(e);
|
|
5895
5897
|
});
|
|
5896
5898
|
}
|
|
5897
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
5898
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
5899
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5900
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: Router, providedIn: 'root' });
|
|
5899
5901
|
}
|
|
5900
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
5902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: Router, decorators: [{
|
|
5901
5903
|
type: Injectable,
|
|
5902
5904
|
args: [{ providedIn: 'root' }]
|
|
5903
5905
|
}], ctorParameters: () => [] });
|
|
@@ -6256,10 +6258,10 @@ class RouterLink {
|
|
|
6256
6258
|
preserveFragment: this.preserveFragment,
|
|
6257
6259
|
});
|
|
6258
6260
|
}
|
|
6259
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
6260
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0
|
|
6261
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", 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 });
|
|
6262
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0", 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 });
|
|
6261
6263
|
}
|
|
6262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
6264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterLink, decorators: [{
|
|
6263
6265
|
type: Directive,
|
|
6264
6266
|
args: [{
|
|
6265
6267
|
selector: '[routerLink]',
|
|
@@ -6414,7 +6416,7 @@ class RouterLinkActive {
|
|
|
6414
6416
|
* true -> Route is active
|
|
6415
6417
|
* false -> Route is inactive
|
|
6416
6418
|
*
|
|
6417
|
-
* ```
|
|
6419
|
+
* ```html
|
|
6418
6420
|
* <a
|
|
6419
6421
|
* routerLink="/user/bob"
|
|
6420
6422
|
* routerLinkActive="active-link"
|
|
@@ -6512,10 +6514,10 @@ class RouterLinkActive {
|
|
|
6512
6514
|
const isActiveCheckFn = this.isLinkActive(this.router);
|
|
6513
6515
|
return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);
|
|
6514
6516
|
}
|
|
6515
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
6516
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0
|
|
6517
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6518
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0", 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 });
|
|
6517
6519
|
}
|
|
6518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
6520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6519
6521
|
type: Directive,
|
|
6520
6522
|
args: [{
|
|
6521
6523
|
selector: '[routerLinkActive]',
|
|
@@ -6566,10 +6568,10 @@ class PreloadAllModules {
|
|
|
6566
6568
|
preload(route, fn) {
|
|
6567
6569
|
return fn().pipe(catchError(() => of(null)));
|
|
6568
6570
|
}
|
|
6569
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
6570
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
6571
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6572
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
|
|
6571
6573
|
}
|
|
6572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
6574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6573
6575
|
type: Injectable,
|
|
6574
6576
|
args: [{ providedIn: 'root' }]
|
|
6575
6577
|
}] });
|
|
@@ -6586,10 +6588,10 @@ class NoPreloading {
|
|
|
6586
6588
|
preload(route, fn) {
|
|
6587
6589
|
return of(null);
|
|
6588
6590
|
}
|
|
6589
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
6590
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
6591
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6592
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: NoPreloading, providedIn: 'root' });
|
|
6591
6593
|
}
|
|
6592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
6594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6593
6595
|
type: Injectable,
|
|
6594
6596
|
args: [{ providedIn: 'root' }]
|
|
6595
6597
|
}] });
|
|
@@ -6685,10 +6687,10 @@ class RouterPreloader {
|
|
|
6685
6687
|
}
|
|
6686
6688
|
});
|
|
6687
6689
|
}
|
|
6688
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
6689
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
6690
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6691
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
|
|
6690
6692
|
}
|
|
6691
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
6693
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6692
6694
|
type: Injectable,
|
|
6693
6695
|
args: [{ providedIn: 'root' }]
|
|
6694
6696
|
}], ctorParameters: () => [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }] });
|
|
@@ -6788,10 +6790,10 @@ class RouterScroller {
|
|
|
6788
6790
|
this.routerEventsSubscription?.unsubscribe();
|
|
6789
6791
|
this.scrollEventsSubscription?.unsubscribe();
|
|
6790
6792
|
}
|
|
6791
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
6792
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0
|
|
6793
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
6794
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterScroller });
|
|
6793
6795
|
}
|
|
6794
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
6796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6795
6797
|
type: Injectable
|
|
6796
6798
|
}], ctorParameters: () => [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }] });
|
|
6797
6799
|
|
|
@@ -7396,7 +7398,7 @@ class RouterModule {
|
|
|
7396
7398
|
*
|
|
7397
7399
|
* When registering the NgModule at the root, import as follows:
|
|
7398
7400
|
*
|
|
7399
|
-
* ```
|
|
7401
|
+
* ```ts
|
|
7400
7402
|
* @NgModule({
|
|
7401
7403
|
* imports: [RouterModule.forRoot(ROUTES)]
|
|
7402
7404
|
* })
|
|
@@ -7446,7 +7448,7 @@ class RouterModule {
|
|
|
7446
7448
|
* without creating a new Router service.
|
|
7447
7449
|
* When registering for submodules and lazy-loaded submodules, create the NgModule as follows:
|
|
7448
7450
|
*
|
|
7449
|
-
* ```
|
|
7451
|
+
* ```ts
|
|
7450
7452
|
* @NgModule({
|
|
7451
7453
|
* imports: [RouterModule.forChild(ROUTES)]
|
|
7452
7454
|
* })
|
|
@@ -7463,11 +7465,11 @@ class RouterModule {
|
|
|
7463
7465
|
providers: [{ provide: ROUTES, multi: true, useValue: routes }],
|
|
7464
7466
|
};
|
|
7465
7467
|
}
|
|
7466
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0
|
|
7467
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0
|
|
7468
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0
|
|
7468
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7469
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
7470
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterModule });
|
|
7469
7471
|
}
|
|
7470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0
|
|
7472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: RouterModule, decorators: [{
|
|
7471
7473
|
type: NgModule,
|
|
7472
7474
|
args: [{
|
|
7473
7475
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7612,7 +7614,7 @@ function mapToResolve(provider) {
|
|
|
7612
7614
|
/**
|
|
7613
7615
|
* @publicApi
|
|
7614
7616
|
*/
|
|
7615
|
-
const VERSION = new Version('19.1.0
|
|
7617
|
+
const VERSION = new Version('19.1.0');
|
|
7616
7618
|
|
|
7617
7619
|
function getLoadedRoutes(route) {
|
|
7618
7620
|
return route._loadedRoutes;
|