@angular/router 20.1.0-next.2 → 20.1.0-rc.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/fesm2022/router.mjs +4 -4
- package/fesm2022/router.mjs.map +1 -1
- package/fesm2022/{router-Cw7qdk0Q.mjs → router2.mjs} +55 -54
- package/fesm2022/router2.mjs.map +1 -0
- package/fesm2022/{router_module-1ZiZ4YRy.mjs → router_module.mjs} +26 -26
- package/fesm2022/router_module.mjs.map +1 -0
- package/fesm2022/testing.mjs +15 -15
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +2 -2
- package/fesm2022/upgrade.mjs.map +1 -1
- package/index.d.ts +4 -4
- package/package.json +4 -4
- package/{router_module.d-dBTUdUNJ.d.ts → router_module.d.d.ts} +1 -1
- package/testing/index.d.ts +3 -3
- package/upgrade/index.d.ts +1 -1
- package/fesm2022/router-Cw7qdk0Q.mjs.map +0 -1
- package/fesm2022/router_module-1ZiZ4YRy.mjs.map +0 -1
package/fesm2022/router.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.1.0-
|
|
2
|
+
* @license Angular v20.1.0-rc.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, OutletContext, PRIMARY_OUTLET, ROUTER_CONFIGURATION, ROUTER_OUTLET_DATA, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterOutlet, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, ɵEmptyOutletComponent, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren } from './
|
|
8
|
-
export { NoPreloading, PreloadAllModules, PreloadingStrategy, ROUTER_INITIALIZER, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterPreloader, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS } from './router_module
|
|
7
|
+
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, OutletContext, PRIMARY_OUTLET, ROUTER_CONFIGURATION, ROUTER_OUTLET_DATA, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterOutlet, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, ɵEmptyOutletComponent, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren } from './router2.mjs';
|
|
8
|
+
export { NoPreloading, PreloadAllModules, PreloadingStrategy, ROUTER_INITIALIZER, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterPreloader, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS } from './router_module.mjs';
|
|
9
9
|
import { inject, Version } from '@angular/core';
|
|
10
10
|
import '@angular/common';
|
|
11
11
|
import 'rxjs';
|
|
@@ -81,7 +81,7 @@ function mapToResolve(provider) {
|
|
|
81
81
|
/**
|
|
82
82
|
* @publicApi
|
|
83
83
|
*/
|
|
84
|
-
const VERSION = new Version('20.1.0-
|
|
84
|
+
const VERSION = new Version('20.1.0-rc.0');
|
|
85
85
|
|
|
86
86
|
export { VERSION, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve };
|
|
87
87
|
//# sourceMappingURL=router.mjs.map
|
package/fesm2022/router.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"router.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/packages/router/src/utils/functional_guards.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/packages/router/src/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Type} from '@angular/core';\n\nimport {\n CanActivate,\n CanActivateChild,\n CanActivateChildFn,\n CanActivateFn,\n CanDeactivate,\n CanDeactivateFn,\n CanMatch,\n CanMatchFn,\n Resolve,\n ResolveFn,\n} from '../models';\n\n/**\n * Maps an array of injectable classes with canMatch functions to an array of equivalent\n * `CanMatchFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanMatch(providers: Array<Type<CanMatch>>): CanMatchFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canMatch(...params),\n );\n}\n\n/**\n * Maps an array of injectable classes with canActivate functions to an array of equivalent\n * `CanActivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivate(providers: Array<Type<CanActivate>>): CanActivateFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivate(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canActivateChild functions to an array of equivalent\n * `CanActivateChildFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanActivateChild(\n providers: Array<Type<CanActivateChild>>,\n): CanActivateChildFn[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canActivateChild(...params),\n );\n}\n/**\n * Maps an array of injectable classes with canDeactivate functions to an array of equivalent\n * `CanDeactivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToCanDeactivate<T = unknown>(\n providers: Array<Type<CanDeactivate<T>>>,\n): CanDeactivateFn<T>[] {\n return providers.map(\n (provider) =>\n (...params) =>\n inject(provider).canDeactivate(...params),\n );\n}\n/**\n * Maps an injectable class with a resolve function to an equivalent `ResolveFn`\n * for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='Resolve'}\n *\n * @publicApi\n * @see {@link Route}\n */\nexport function mapToResolve<T>(provider: Type<Resolve<T>>): ResolveFn<T> {\n return (...params) => inject(provider).resolve(...params);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('20.1.0-rc.0');\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAuBA;;;;;;;;AAQG;AACG,SAAU,aAAa,CAAC,SAAgC,EAAA;IAC5D,OAAO,SAAS,CAAC,GAAG,CAClB,CAAC,QAAQ,KACP,CAAC,GAAG,MAAM,KACR,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CACzC;AACH;AAEA;;;;;;;;AAQG;AACG,SAAU,gBAAgB,CAAC,SAAmC,EAAA;IAClE,OAAO,SAAS,CAAC,GAAG,CAClB,CAAC,QAAQ,KACP,CAAC,GAAG,MAAM,KACR,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,CAC5C;AACH;AACA;;;;;;;;AAQG;AACG,SAAU,qBAAqB,CACnC,SAAwC,EAAA;IAExC,OAAO,SAAS,CAAC,GAAG,CAClB,CAAC,QAAQ,KACP,CAAC,GAAG,MAAM,KACR,MAAM,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,CACjD;AACH;AACA;;;;;;;;AAQG;AACG,SAAU,kBAAkB,CAChC,SAAwC,EAAA;IAExC,OAAO,SAAS,CAAC,GAAG,CAClB,CAAC,QAAQ,KACP,CAAC,GAAG,MAAM,KACR,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,CAC9C;AACH;AACA;;;;;;;;AAQG;AACG,SAAU,YAAY,CAAI,QAA0B,EAAA;AACxD,IAAA,OAAO,CAAC,GAAG,MAAM,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC;AAC3D;;AC/FA;;;;AAIG;AAIH;;AAEG;MACU,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v20.1.0-
|
|
2
|
+
* @license Angular v20.1.0-rc.0
|
|
3
3
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -432,10 +432,10 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
432
432
|
* @publicApi
|
|
433
433
|
*/
|
|
434
434
|
class UrlSerializer {
|
|
435
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
436
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
435
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
436
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
|
|
437
437
|
}
|
|
438
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
438
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
439
439
|
type: Injectable,
|
|
440
440
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
441
441
|
}] });
|
|
@@ -2119,10 +2119,10 @@ class ChildrenOutletContexts {
|
|
|
2119
2119
|
getContext(childName) {
|
|
2120
2120
|
return this.contexts.get(childName) || null;
|
|
2121
2121
|
}
|
|
2122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
2123
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
2122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: ChildrenOutletContexts, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2123
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
|
|
2124
2124
|
}
|
|
2125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
2125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
2126
2126
|
type: Injectable,
|
|
2127
2127
|
args: [{ providedIn: 'root' }]
|
|
2128
2128
|
}], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });
|
|
@@ -2909,10 +2909,10 @@ class RouterOutlet {
|
|
|
2909
2909
|
this.inputBinder?.bindActivatedRouteToOutletComponent(this);
|
|
2910
2910
|
this.activateEvents.emit(this.activated.instance);
|
|
2911
2911
|
}
|
|
2912
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
2913
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.0-
|
|
2912
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2913
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.0-rc.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 });
|
|
2914
2914
|
}
|
|
2915
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
2915
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2916
2916
|
type: Directive,
|
|
2917
2917
|
args: [{
|
|
2918
2918
|
selector: 'router-outlet',
|
|
@@ -3022,10 +3022,10 @@ class RoutedComponentInputBinder {
|
|
|
3022
3022
|
});
|
|
3023
3023
|
this.outletDataSubscriptions.set(outlet, dataSubscription);
|
|
3024
3024
|
}
|
|
3025
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
3026
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
3025
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3026
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RoutedComponentInputBinder });
|
|
3027
3027
|
}
|
|
3028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
3028
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{
|
|
3029
3029
|
type: Injectable
|
|
3030
3030
|
}] });
|
|
3031
3031
|
|
|
@@ -3039,10 +3039,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-next.2",
|
|
|
3039
3039
|
* to this `EmptyOutletComponent`.
|
|
3040
3040
|
*/
|
|
3041
3041
|
class ɵEmptyOutletComponent {
|
|
3042
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
3043
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.0-
|
|
3042
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3043
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.0-rc.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"] }] });
|
|
3044
3044
|
}
|
|
3045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
3045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
3046
3046
|
type: Component,
|
|
3047
3047
|
args: [{
|
|
3048
3048
|
template: `<router-outlet/>`,
|
|
@@ -4403,10 +4403,10 @@ class TitleStrategy {
|
|
|
4403
4403
|
getResolvedTitleForRoute(snapshot) {
|
|
4404
4404
|
return snapshot.data[RouteTitleKey];
|
|
4405
4405
|
}
|
|
4406
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
4407
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
4406
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4407
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
|
|
4408
4408
|
}
|
|
4409
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
4409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4410
4410
|
type: Injectable,
|
|
4411
4411
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4412
4412
|
}] });
|
|
@@ -4430,10 +4430,10 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4430
4430
|
this.title.setTitle(title);
|
|
4431
4431
|
}
|
|
4432
4432
|
}
|
|
4433
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
4434
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
4433
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4434
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
4435
4435
|
}
|
|
4436
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
4436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4437
4437
|
type: Injectable,
|
|
4438
4438
|
args: [{ providedIn: 'root' }]
|
|
4439
4439
|
}], ctorParameters: () => [{ type: i1.Title }] });
|
|
@@ -4465,7 +4465,7 @@ class RouterConfigLoader {
|
|
|
4465
4465
|
onLoadStartListener;
|
|
4466
4466
|
onLoadEndListener;
|
|
4467
4467
|
compiler = inject(Compiler);
|
|
4468
|
-
loadComponent(route) {
|
|
4468
|
+
loadComponent(injector, route) {
|
|
4469
4469
|
if (this.componentLoaders.get(route)) {
|
|
4470
4470
|
return this.componentLoaders.get(route);
|
|
4471
4471
|
}
|
|
@@ -4475,7 +4475,7 @@ class RouterConfigLoader {
|
|
|
4475
4475
|
if (this.onLoadStartListener) {
|
|
4476
4476
|
this.onLoadStartListener(route);
|
|
4477
4477
|
}
|
|
4478
|
-
const loadRunner = wrapIntoObservable(route.loadComponent()).pipe(map(maybeUnwrapDefaultExport), tap((component) => {
|
|
4478
|
+
const loadRunner = wrapIntoObservable(runInInjectionContext(injector, () => route.loadComponent())).pipe(map(maybeUnwrapDefaultExport), tap((component) => {
|
|
4479
4479
|
if (this.onLoadEndListener) {
|
|
4480
4480
|
this.onLoadEndListener(route);
|
|
4481
4481
|
}
|
|
@@ -4509,10 +4509,10 @@ class RouterConfigLoader {
|
|
|
4509
4509
|
this.childrenLoaders.set(route, loader);
|
|
4510
4510
|
return loader;
|
|
4511
4511
|
}
|
|
4512
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
4513
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
4512
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4513
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
|
|
4514
4514
|
}
|
|
4515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
4515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4516
4516
|
type: Injectable,
|
|
4517
4517
|
args: [{ providedIn: 'root' }]
|
|
4518
4518
|
}] });
|
|
@@ -4525,7 +4525,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-next.2",
|
|
|
4525
4525
|
* an update to the extractor.
|
|
4526
4526
|
*/
|
|
4527
4527
|
function loadChildren(route, compiler, parentInjector, onLoadEndListener) {
|
|
4528
|
-
return wrapIntoObservable(route.loadChildren()).pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {
|
|
4528
|
+
return wrapIntoObservable(runInInjectionContext(parentInjector, () => route.loadChildren())).pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {
|
|
4529
4529
|
if (t instanceof NgModuleFactory || Array.isArray(t)) {
|
|
4530
4530
|
return of(t);
|
|
4531
4531
|
}
|
|
@@ -4579,10 +4579,10 @@ function maybeUnwrapDefaultExport(input) {
|
|
|
4579
4579
|
* @publicApi
|
|
4580
4580
|
*/
|
|
4581
4581
|
class UrlHandlingStrategy {
|
|
4582
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
4583
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
4582
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4583
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
|
|
4584
4584
|
}
|
|
4585
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
4585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4586
4586
|
type: Injectable,
|
|
4587
4587
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4588
4588
|
}] });
|
|
@@ -4599,10 +4599,10 @@ class DefaultUrlHandlingStrategy {
|
|
|
4599
4599
|
merge(newUrlPart, wholeUrl) {
|
|
4600
4600
|
return newUrlPart;
|
|
4601
4601
|
}
|
|
4602
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
4603
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
4602
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4603
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
|
|
4604
4604
|
}
|
|
4605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
4605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
4606
4606
|
type: Injectable,
|
|
4607
4607
|
args: [{ providedIn: 'root' }]
|
|
4608
4608
|
}] });
|
|
@@ -4884,7 +4884,8 @@ class NavigationTransitions {
|
|
|
4884
4884
|
const loadComponents = (route) => {
|
|
4885
4885
|
const loaders = [];
|
|
4886
4886
|
if (route.routeConfig?.loadComponent && !route.routeConfig._loadedComponent) {
|
|
4887
|
-
|
|
4887
|
+
const injector = getClosestRouteInjector(route) ?? this.environmentInjector;
|
|
4888
|
+
loaders.push(this.configLoader.loadComponent(injector, route.routeConfig).pipe(tap((loadedComponent) => {
|
|
4888
4889
|
route.component = loadedComponent;
|
|
4889
4890
|
}), map(() => void 0)));
|
|
4890
4891
|
}
|
|
@@ -5056,10 +5057,10 @@ class NavigationTransitions {
|
|
|
5056
5057
|
return (currentBrowserUrl.toString() !== targetBrowserUrl?.toString() &&
|
|
5057
5058
|
!this.currentNavigation?.extras.skipLocationChange);
|
|
5058
5059
|
}
|
|
5059
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
5060
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
5060
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5061
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
|
|
5061
5062
|
}
|
|
5062
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
5063
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
5063
5064
|
type: Injectable,
|
|
5064
5065
|
args: [{ providedIn: 'root' }]
|
|
5065
5066
|
}], ctorParameters: () => [] });
|
|
@@ -5075,10 +5076,10 @@ function isBrowserTriggeredNavigation(source) {
|
|
|
5075
5076
|
* @publicApi
|
|
5076
5077
|
*/
|
|
5077
5078
|
class RouteReuseStrategy {
|
|
5078
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
5079
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
5079
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5080
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
|
|
5080
5081
|
}
|
|
5081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
5082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
5082
5083
|
type: Injectable,
|
|
5083
5084
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
5084
5085
|
}] });
|
|
@@ -5129,10 +5130,10 @@ class BaseRouteReuseStrategy {
|
|
|
5129
5130
|
}
|
|
5130
5131
|
}
|
|
5131
5132
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
5132
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
5133
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
5133
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5134
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
|
|
5134
5135
|
}
|
|
5135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
5136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
5136
5137
|
type: Injectable,
|
|
5137
5138
|
args: [{ providedIn: 'root' }]
|
|
5138
5139
|
}] });
|
|
@@ -5231,10 +5232,10 @@ class StateManager {
|
|
|
5231
5232
|
// when merging, such as the query params so they are not lost on a refresh.
|
|
5232
5233
|
this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, finalUrl ?? this.rawUrlTree);
|
|
5233
5234
|
}
|
|
5234
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
5235
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
5235
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: StateManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5236
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: StateManager, providedIn: 'root', useFactory: () => inject(HistoryStateManager) });
|
|
5236
5237
|
}
|
|
5237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
5238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: StateManager, decorators: [{
|
|
5238
5239
|
type: Injectable,
|
|
5239
5240
|
args: [{ providedIn: 'root', useFactory: () => inject(HistoryStateManager) }]
|
|
5240
5241
|
}] });
|
|
@@ -5366,10 +5367,10 @@ class HistoryStateManager extends StateManager {
|
|
|
5366
5367
|
}
|
|
5367
5368
|
return { navigationId };
|
|
5368
5369
|
}
|
|
5369
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
5370
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
5370
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: HistoryStateManager, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
5371
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: HistoryStateManager, providedIn: 'root' });
|
|
5371
5372
|
}
|
|
5372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
5373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: HistoryStateManager, decorators: [{
|
|
5373
5374
|
type: Injectable,
|
|
5374
5375
|
args: [{ providedIn: 'root' }]
|
|
5375
5376
|
}] });
|
|
@@ -5934,10 +5935,10 @@ class Router {
|
|
|
5934
5935
|
return Promise.reject(e);
|
|
5935
5936
|
});
|
|
5936
5937
|
}
|
|
5937
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-
|
|
5938
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-
|
|
5938
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5939
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: Router, providedIn: 'root' });
|
|
5939
5940
|
}
|
|
5940
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-
|
|
5941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0-rc.0", ngImport: i0, type: Router, decorators: [{
|
|
5941
5942
|
type: Injectable,
|
|
5942
5943
|
args: [{ providedIn: 'root' }]
|
|
5943
5944
|
}], ctorParameters: () => [] });
|
|
@@ -5952,4 +5953,4 @@ function validateCommands(commands) {
|
|
|
5952
5953
|
}
|
|
5953
5954
|
|
|
5954
5955
|
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, CREATE_VIEW_TRANSITION, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, IMPERATIVE_NAVIGATION, INPUT_BINDER, NAVIGATION_ERROR_HANDLER, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, NavigationTransitions, OutletContext, PRIMARY_OUTLET, ROUTER_CONFIGURATION, ROUTER_OUTLET_DATA, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, RoutedComponentInputBinder, Router, RouterConfigLoader, RouterEvent, RouterOutlet, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VIEW_TRANSITION_OPTIONS, afterNextNavigation, convertToParamMap, createUrlTreeFromSnapshot, createViewTransition, defaultUrlMatcher, isUrlTree, loadChildren, stringifyEvent, ɵEmptyOutletComponent };
|
|
5955
|
-
//# sourceMappingURL=
|
|
5956
|
+
//# sourceMappingURL=router2.mjs.map
|