@angular/router 14.0.0-next.14 → 14.0.0-next.15
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/esm2020/src/apply_redirects.mjs +4 -4
- package/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/directives/router_link.mjs +6 -6
- package/esm2020/src/directives/router_link_active.mjs +22 -4
- package/esm2020/src/directives/router_outlet.mjs +5 -5
- package/esm2020/src/models.mjs +1 -1
- package/esm2020/src/page_title_strategy.mjs +3 -3
- package/esm2020/src/recognize.mjs +3 -3
- package/esm2020/src/router.mjs +36 -23
- package/esm2020/src/router_config_loader.mjs +61 -25
- package/esm2020/src/router_module.mjs +7 -7
- package/esm2020/src/router_preloader.mjs +30 -21
- package/esm2020/src/router_scroller.mjs +3 -3
- package/esm2020/src/utils/config.mjs +28 -11
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_module.mjs +4 -4
- package/fesm2015/router.mjs +205 -110
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +201 -109
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/upgrade.mjs +1 -1
- package/{router.d.ts → index.d.ts} +3808 -3774
- package/package.json +8 -8
- package/testing/{testing.d.ts → index.d.ts} +65 -64
- package/upgrade/{upgrade.d.ts → index.d.ts} +51 -50
- package/testing/package.json +0 -9
- package/upgrade/package.json +0 -10
package/fesm2015/router.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.15
|
|
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 { ɵisObservable, ɵisPromise, EventEmitter, Directive, Attribute, Output, Component, ComponentFactoryResolver, createEnvironmentInjector, InjectionToken, InjectFlags, NgModuleFactory, Injectable, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, Input, HostListener, HostBinding, Optional, ContentChildren, Injector, Compiler, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, Inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, ApplicationRef, Version } from '@angular/core';
|
|
8
|
+
import { ɵisObservable, ɵisPromise, EventEmitter, Directive, Attribute, Output, Component, ɵisStandalone, ComponentFactoryResolver, createEnvironmentInjector, InjectionToken, InjectFlags, NgModuleFactory, Injectable, NgModuleRef, ɵConsole, NgZone, ɵcoerceToBoolean, Input, HostListener, HostBinding, Optional, ContentChildren, Injector, Compiler, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, Inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, ApplicationRef, Version } from '@angular/core';
|
|
9
9
|
import { from, of, BehaviorSubject, combineLatest, throwError, EmptyError, concat, defer, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
|
|
10
|
-
import { map, switchMap, take, startWith, scan, filter, catchError, concatMap, last as last$1, first, mergeMap, tap, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';
|
|
10
|
+
import { map, switchMap, take, startWith, scan, filter, catchError, concatMap, last as last$1, first, mergeMap, tap, takeLast, mapTo, finalize, refCount, defaultIfEmpty, mergeAll } from 'rxjs/operators';
|
|
11
11
|
import * as i3 from '@angular/common';
|
|
12
12
|
import { Location, LocationStrategy, PlatformLocation, APP_BASE_HREF, ViewportScroller, HashLocationStrategy, PathLocationStrategy, LOCATION_INITIALIZED } from '@angular/common';
|
|
13
13
|
import * as i1 from '@angular/platform-browser';
|
|
@@ -2258,7 +2258,7 @@ class RouterOutlet {
|
|
|
2258
2258
|
this._activatedRoute = activatedRoute;
|
|
2259
2259
|
const location = this.location;
|
|
2260
2260
|
const snapshot = activatedRoute._futureSnapshot;
|
|
2261
|
-
const component = snapshot.
|
|
2261
|
+
const component = snapshot.component;
|
|
2262
2262
|
const childContexts = this.parentContexts.getOrCreateContext(this.name).children;
|
|
2263
2263
|
const injector = new OutletInjector(activatedRoute, childContexts, location.injector);
|
|
2264
2264
|
if (resolverOrInjector && isComponentFactoryResolver(resolverOrInjector)) {
|
|
@@ -2275,9 +2275,9 @@ class RouterOutlet {
|
|
|
2275
2275
|
this.activateEvents.emit(this.activated.instance);
|
|
2276
2276
|
}
|
|
2277
2277
|
}
|
|
2278
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
2279
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
2280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
2278
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterOutlet, deps: [{ token: ChildrenOutletContexts }, { token: i0.ViewContainerRef }, { token: 'name', attribute: true }, { token: i0.ChangeDetectorRef }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2279
|
+
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.15", type: RouterOutlet, selector: "router-outlet", outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], ngImport: i0 });
|
|
2280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2281
2281
|
type: Directive,
|
|
2282
2282
|
args: [{ selector: 'router-outlet', exportAs: 'outlet' }]
|
|
2283
2283
|
}], ctorParameters: function () {
|
|
@@ -2336,9 +2336,9 @@ function isComponentFactoryResolver(item) {
|
|
|
2336
2336
|
*/
|
|
2337
2337
|
class ɵEmptyOutletComponent {
|
|
2338
2338
|
}
|
|
2339
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
2340
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
2341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
2339
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2340
|
+
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.15", type: ɵEmptyOutletComponent, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
2341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2342
2342
|
type: Component,
|
|
2343
2343
|
args: [{ template: `<router-outlet></router-outlet>` }]
|
|
2344
2344
|
}] });
|
|
@@ -2356,18 +2356,26 @@ function getLoadedRoutes(route) {
|
|
|
2356
2356
|
function getLoadedInjector(route) {
|
|
2357
2357
|
return route._loadedInjector;
|
|
2358
2358
|
}
|
|
2359
|
+
function getLoadedComponent(route) {
|
|
2360
|
+
return route._loadedComponent;
|
|
2361
|
+
}
|
|
2359
2362
|
function getProvidersInjector(route) {
|
|
2360
2363
|
return route._injector;
|
|
2361
2364
|
}
|
|
2362
|
-
function validateConfig(config, parentPath = '') {
|
|
2365
|
+
function validateConfig(config, parentPath = '', requireStandaloneComponents = false) {
|
|
2363
2366
|
// forEach doesn't iterate undefined values
|
|
2364
2367
|
for (let i = 0; i < config.length; i++) {
|
|
2365
2368
|
const route = config[i];
|
|
2366
2369
|
const fullPath = getFullPath(parentPath, route);
|
|
2367
|
-
validateNode(route, fullPath);
|
|
2370
|
+
validateNode(route, fullPath, requireStandaloneComponents);
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
function assertStandalone(fullPath, component) {
|
|
2374
|
+
if (component && !ɵisStandalone(component)) {
|
|
2375
|
+
throw new Error(`Invalid configuration of route '${fullPath}'. The component must be standalone.`);
|
|
2368
2376
|
}
|
|
2369
2377
|
}
|
|
2370
|
-
function validateNode(route, fullPath) {
|
|
2378
|
+
function validateNode(route, fullPath, requireStandaloneComponents) {
|
|
2371
2379
|
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2372
2380
|
if (!route) {
|
|
2373
2381
|
throw new Error(`
|
|
@@ -2385,7 +2393,7 @@ function validateNode(route, fullPath) {
|
|
|
2385
2393
|
if (Array.isArray(route)) {
|
|
2386
2394
|
throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);
|
|
2387
2395
|
}
|
|
2388
|
-
if (!route.component && !route.children && !route.loadChildren &&
|
|
2396
|
+
if (!route.component && !route.loadComponent && !route.children && !route.loadChildren &&
|
|
2389
2397
|
(route.outlet && route.outlet !== PRIMARY_OUTLET)) {
|
|
2390
2398
|
throw new Error(`Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);
|
|
2391
2399
|
}
|
|
@@ -2398,8 +2406,11 @@ function validateNode(route, fullPath) {
|
|
|
2398
2406
|
if (route.children && route.loadChildren) {
|
|
2399
2407
|
throw new Error(`Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);
|
|
2400
2408
|
}
|
|
2401
|
-
if (route.redirectTo && route.component) {
|
|
2402
|
-
throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and component cannot be used together`);
|
|
2409
|
+
if (route.redirectTo && (route.component || route.loadComponent)) {
|
|
2410
|
+
throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);
|
|
2411
|
+
}
|
|
2412
|
+
if (route.component && route.loadComponent) {
|
|
2413
|
+
throw new Error(`Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);
|
|
2403
2414
|
}
|
|
2404
2415
|
if (route.redirectTo && route.canActivate) {
|
|
2405
2416
|
throw new Error(`Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +
|
|
@@ -2408,8 +2419,9 @@ function validateNode(route, fullPath) {
|
|
|
2408
2419
|
if (route.path && route.matcher) {
|
|
2409
2420
|
throw new Error(`Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);
|
|
2410
2421
|
}
|
|
2411
|
-
if (route.redirectTo === void 0 && !route.component && !route.
|
|
2412
|
-
|
|
2422
|
+
if (route.redirectTo === void 0 && !route.component && !route.loadComponent &&
|
|
2423
|
+
!route.children && !route.loadChildren) {
|
|
2424
|
+
throw new Error(`Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`);
|
|
2413
2425
|
}
|
|
2414
2426
|
if (route.path === void 0 && route.matcher === void 0) {
|
|
2415
2427
|
throw new Error(`Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);
|
|
@@ -2421,9 +2433,12 @@ function validateNode(route, fullPath) {
|
|
|
2421
2433
|
const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;
|
|
2422
2434
|
throw new Error(`Invalid configuration of route '{path: "${fullPath}", redirectTo: "${route.redirectTo}"}': please provide 'pathMatch'. ${exp}`);
|
|
2423
2435
|
}
|
|
2436
|
+
if (requireStandaloneComponents) {
|
|
2437
|
+
assertStandalone(fullPath, route.component);
|
|
2438
|
+
}
|
|
2424
2439
|
}
|
|
2425
2440
|
if (route.children) {
|
|
2426
|
-
validateConfig(route.children, fullPath);
|
|
2441
|
+
validateConfig(route.children, fullPath, requireStandaloneComponents);
|
|
2427
2442
|
}
|
|
2428
2443
|
}
|
|
2429
2444
|
function getFullPath(parentPath, currentRoute) {
|
|
@@ -2449,7 +2464,8 @@ function getFullPath(parentPath, currentRoute) {
|
|
|
2449
2464
|
function standardizeConfig(r) {
|
|
2450
2465
|
const children = r.children && r.children.map(standardizeConfig);
|
|
2451
2466
|
const c = children ? Object.assign(Object.assign({}, r), { children }) : Object.assign({}, r);
|
|
2452
|
-
if (!c.component &&
|
|
2467
|
+
if ((!c.component && !c.loadComponent) && (children || c.loadChildren) &&
|
|
2468
|
+
(c.outlet && c.outlet !== PRIMARY_OUTLET)) {
|
|
2453
2469
|
c.component = ɵEmptyOutletComponent;
|
|
2454
2470
|
}
|
|
2455
2471
|
return c;
|
|
@@ -3106,7 +3122,7 @@ class ApplyRedirects {
|
|
|
3106
3122
|
if (route.loadChildren) {
|
|
3107
3123
|
const loaded$ = route._loadedRoutes ?
|
|
3108
3124
|
of({ routes: route._loadedRoutes, injector: route._loadedInjector }) :
|
|
3109
|
-
this.configLoader.
|
|
3125
|
+
this.configLoader.loadChildren(injector, route);
|
|
3110
3126
|
return loaded$.pipe(map((cfg) => {
|
|
3111
3127
|
route._loadedRoutes = cfg.routes;
|
|
3112
3128
|
route._loadedInjector = cfg.injector;
|
|
@@ -3151,10 +3167,10 @@ class ApplyRedirects {
|
|
|
3151
3167
|
return this.runCanLoadGuards(injector, route, segments)
|
|
3152
3168
|
.pipe(mergeMap((shouldLoadResult) => {
|
|
3153
3169
|
if (shouldLoadResult) {
|
|
3154
|
-
return this.configLoader.
|
|
3170
|
+
return this.configLoader.loadChildren(injector, route)
|
|
3171
|
+
.pipe(tap((cfg) => {
|
|
3155
3172
|
route._loadedRoutes = cfg.routes;
|
|
3156
3173
|
route._loadedInjector = cfg.injector;
|
|
3157
|
-
return cfg;
|
|
3158
3174
|
}));
|
|
3159
3175
|
}
|
|
3160
3176
|
return canLoadFails(route);
|
|
@@ -3687,6 +3703,7 @@ class Recognizer {
|
|
|
3687
3703
|
return null;
|
|
3688
3704
|
}
|
|
3689
3705
|
processSegmentAgainstRoute(route, rawSegment, segments, outlet) {
|
|
3706
|
+
var _a, _b, _c, _d;
|
|
3690
3707
|
if (route.redirectTo || !isImmediateMatch(route, rawSegment, segments, outlet))
|
|
3691
3708
|
return null;
|
|
3692
3709
|
let snapshot;
|
|
@@ -3695,7 +3712,7 @@ class Recognizer {
|
|
|
3695
3712
|
if (route.path === '**') {
|
|
3696
3713
|
const params = segments.length > 0 ? last(segments).parameters : {};
|
|
3697
3714
|
const pathIndexShift = getPathIndexShift(rawSegment) + segments.length;
|
|
3698
|
-
snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route),
|
|
3715
|
+
snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), (_b = (_a = route.component) !== null && _a !== void 0 ? _a : route._loadedComponent) !== null && _b !== void 0 ? _b : null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route),
|
|
3699
3716
|
// NG_DEV_MODE is used to prevent the getCorrectedPathIndexShift function from affecting
|
|
3700
3717
|
// production bundle size. This value is intended only to surface a warning to users
|
|
3701
3718
|
// depending on `relativeLinkResolution: 'legacy'` in dev mode.
|
|
@@ -3710,7 +3727,7 @@ class Recognizer {
|
|
|
3710
3727
|
consumedSegments = result.consumedSegments;
|
|
3711
3728
|
remainingSegments = result.remainingSegments;
|
|
3712
3729
|
const pathIndexShift = getPathIndexShift(rawSegment) + consumedSegments.length;
|
|
3713
|
-
snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), route.component, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route), (NG_DEV_MODE$2 ? getCorrectedPathIndexShift(rawSegment) + consumedSegments.length :
|
|
3730
|
+
snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(Object.assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), getOutlet(route), (_d = (_c = route.component) !== null && _c !== void 0 ? _c : route._loadedComponent) !== null && _d !== void 0 ? _d : null, route, getSourceSegmentGroup(rawSegment), pathIndexShift, getResolve(route), (NG_DEV_MODE$2 ? getCorrectedPathIndexShift(rawSegment) + consumedSegments.length :
|
|
3714
3731
|
pathIndexShift));
|
|
3715
3732
|
}
|
|
3716
3733
|
const childConfig = getChildConfig(route);
|
|
@@ -4032,11 +4049,38 @@ class RouterConfigLoader {
|
|
|
4032
4049
|
constructor(injector, compiler) {
|
|
4033
4050
|
this.injector = injector;
|
|
4034
4051
|
this.compiler = compiler;
|
|
4035
|
-
this.
|
|
4052
|
+
this.componentLoaders = new WeakMap();
|
|
4053
|
+
this.childrenLoaders = new WeakMap();
|
|
4036
4054
|
}
|
|
4037
|
-
|
|
4038
|
-
if (this.
|
|
4039
|
-
return this.
|
|
4055
|
+
loadComponent(route) {
|
|
4056
|
+
if (this.componentLoaders.get(route)) {
|
|
4057
|
+
return this.componentLoaders.get(route);
|
|
4058
|
+
}
|
|
4059
|
+
else if (route._loadedComponent) {
|
|
4060
|
+
return of(route._loadedComponent);
|
|
4061
|
+
}
|
|
4062
|
+
if (this.onLoadStartListener) {
|
|
4063
|
+
this.onLoadStartListener(route);
|
|
4064
|
+
}
|
|
4065
|
+
const loadRunner = wrapIntoObservable(route.loadComponent())
|
|
4066
|
+
.pipe(tap(component => {
|
|
4067
|
+
var _a;
|
|
4068
|
+
if (this.onLoadEndListener) {
|
|
4069
|
+
this.onLoadEndListener(route);
|
|
4070
|
+
}
|
|
4071
|
+
NG_DEV_MODE$1 && assertStandalone((_a = route.path) !== null && _a !== void 0 ? _a : '', component);
|
|
4072
|
+
route._loadedComponent = component;
|
|
4073
|
+
}), finalize(() => {
|
|
4074
|
+
this.componentLoaders.delete(route);
|
|
4075
|
+
}));
|
|
4076
|
+
// Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much
|
|
4077
|
+
const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());
|
|
4078
|
+
this.componentLoaders.set(route, loader);
|
|
4079
|
+
return loader;
|
|
4080
|
+
}
|
|
4081
|
+
loadChildren(parentInjector, route) {
|
|
4082
|
+
if (this.childrenLoaders.get(route)) {
|
|
4083
|
+
return this.childrenLoaders.get(route);
|
|
4040
4084
|
}
|
|
4041
4085
|
else if (route._loadedRoutes) {
|
|
4042
4086
|
return of({ routes: route._loadedRoutes, injector: route._loadedInjector });
|
|
@@ -4044,33 +4088,43 @@ class RouterConfigLoader {
|
|
|
4044
4088
|
if (this.onLoadStartListener) {
|
|
4045
4089
|
this.onLoadStartListener(route);
|
|
4046
4090
|
}
|
|
4047
|
-
const
|
|
4048
|
-
const loadRunner =
|
|
4091
|
+
const moduleFactoryOrRoutes$ = this.loadModuleFactoryOrRoutes(route.loadChildren);
|
|
4092
|
+
const loadRunner = moduleFactoryOrRoutes$.pipe(map((factoryOrRoutes) => {
|
|
4049
4093
|
if (this.onLoadEndListener) {
|
|
4050
4094
|
this.onLoadEndListener(route);
|
|
4051
4095
|
}
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4096
|
+
// This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is no
|
|
4097
|
+
// injector associated with lazy loading a `Route` array.
|
|
4098
|
+
let injector;
|
|
4099
|
+
let rawRoutes;
|
|
4100
|
+
let requireStandaloneComponents = false;
|
|
4101
|
+
if (Array.isArray(factoryOrRoutes)) {
|
|
4102
|
+
rawRoutes = factoryOrRoutes;
|
|
4103
|
+
requireStandaloneComponents = true;
|
|
4104
|
+
}
|
|
4105
|
+
else {
|
|
4106
|
+
injector = factoryOrRoutes.create(parentInjector).injector;
|
|
4107
|
+
// When loading a module that doesn't provide `RouterModule.forChild()` preloader
|
|
4108
|
+
// will get stuck in an infinite loop. The child module's Injector will look to
|
|
4109
|
+
// its parent `Injector` when it doesn't find any ROUTES so it will return routes
|
|
4110
|
+
// for it's parent module instead.
|
|
4111
|
+
rawRoutes = flatten(injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional));
|
|
4112
|
+
}
|
|
4113
|
+
const routes = rawRoutes.map(standardizeConfig);
|
|
4114
|
+
NG_DEV_MODE$1 && validateConfig(routes, route.path, requireStandaloneComponents);
|
|
4061
4115
|
return { routes, injector };
|
|
4062
4116
|
}), finalize(() => {
|
|
4063
|
-
this.
|
|
4117
|
+
this.childrenLoaders.delete(route);
|
|
4064
4118
|
}));
|
|
4065
4119
|
// Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much
|
|
4066
4120
|
const loader = new ConnectableObservable(loadRunner, () => new Subject())
|
|
4067
4121
|
.pipe(refCount());
|
|
4068
|
-
this.
|
|
4122
|
+
this.childrenLoaders.set(route, loader);
|
|
4069
4123
|
return loader;
|
|
4070
4124
|
}
|
|
4071
|
-
|
|
4125
|
+
loadModuleFactoryOrRoutes(loadChildren) {
|
|
4072
4126
|
return wrapIntoObservable(loadChildren()).pipe(mergeMap((t) => {
|
|
4073
|
-
if (t instanceof NgModuleFactory) {
|
|
4127
|
+
if (t instanceof NgModuleFactory || Array.isArray(t)) {
|
|
4074
4128
|
return of(t);
|
|
4075
4129
|
}
|
|
4076
4130
|
else {
|
|
@@ -4079,9 +4133,9 @@ class RouterConfigLoader {
|
|
|
4079
4133
|
}));
|
|
4080
4134
|
}
|
|
4081
4135
|
}
|
|
4082
|
-
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
4083
|
-
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
4084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
4136
|
+
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4137
|
+
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterConfigLoader });
|
|
4138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4085
4139
|
type: Injectable
|
|
4086
4140
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
|
|
4087
4141
|
|
|
@@ -4496,6 +4550,26 @@ class Router {
|
|
|
4496
4550
|
skipLocationChange: !!skipLocationChange,
|
|
4497
4551
|
replaceUrl: !!replaceUrl,
|
|
4498
4552
|
});
|
|
4553
|
+
}),
|
|
4554
|
+
// --- LOAD COMPONENTS ---
|
|
4555
|
+
switchTap((t) => {
|
|
4556
|
+
const loadComponents = (route) => {
|
|
4557
|
+
var _a;
|
|
4558
|
+
const loaders = [];
|
|
4559
|
+
if (((_a = route.routeConfig) === null || _a === void 0 ? void 0 : _a.loadComponent) &&
|
|
4560
|
+
!route.routeConfig._loadedComponent) {
|
|
4561
|
+
loaders.push(this.configLoader.loadComponent(route.routeConfig)
|
|
4562
|
+
.pipe(tap(loadedComponent => {
|
|
4563
|
+
route.component = loadedComponent;
|
|
4564
|
+
}), map(() => void 0)));
|
|
4565
|
+
}
|
|
4566
|
+
for (const child of route.children) {
|
|
4567
|
+
loaders.push(...loadComponents(child));
|
|
4568
|
+
}
|
|
4569
|
+
return loaders;
|
|
4570
|
+
};
|
|
4571
|
+
return combineLatest(loadComponents(t.targetSnapshot.root))
|
|
4572
|
+
.pipe(defaultIfEmpty(), take(1));
|
|
4499
4573
|
}), map((t) => {
|
|
4500
4574
|
const targetRouterState = createRouterState(this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);
|
|
4501
4575
|
return (Object.assign(Object.assign({}, t), { targetRouterState }));
|
|
@@ -4575,23 +4649,17 @@ class Router {
|
|
|
4575
4649
|
t.resolve(false);
|
|
4576
4650
|
}
|
|
4577
4651
|
else {
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
// the navigation is rejected.
|
|
4590
|
-
replaceUrl: this.urlUpdateStrategy === 'eager' ||
|
|
4591
|
-
isBrowserTriggeredNavigation(t.source)
|
|
4592
|
-
};
|
|
4593
|
-
this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });
|
|
4594
|
-
}, 0);
|
|
4652
|
+
const mergedTree = this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);
|
|
4653
|
+
const extras = {
|
|
4654
|
+
skipLocationChange: t.extras.skipLocationChange,
|
|
4655
|
+
// The URL is already updated at this point if we have 'eager' URL
|
|
4656
|
+
// updates or if the navigation was triggered by the browser (back
|
|
4657
|
+
// button, URL bar, etc). We want to replace that item in history if
|
|
4658
|
+
// the navigation is rejected.
|
|
4659
|
+
replaceUrl: this.urlUpdateStrategy === 'eager' ||
|
|
4660
|
+
isBrowserTriggeredNavigation(t.source)
|
|
4661
|
+
};
|
|
4662
|
+
this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });
|
|
4595
4663
|
}
|
|
4596
4664
|
/* All other errors should reset to the router's internal URL reference to
|
|
4597
4665
|
* the pre-error state. */
|
|
@@ -5060,9 +5128,9 @@ class Router {
|
|
|
5060
5128
|
return { navigationId };
|
|
5061
5129
|
}
|
|
5062
5130
|
}
|
|
5063
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5064
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5131
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: Router, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
5132
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: Router });
|
|
5133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: Router, decorators: [{
|
|
5066
5134
|
type: Injectable
|
|
5067
5135
|
}], ctorParameters: function () { return [{ type: i0.Type }, { type: UrlSerializer }, { type: ChildrenOutletContexts }, { type: i3.Location }, { type: i0.Injector }, { type: i0.Compiler }, { type: undefined }]; } });
|
|
5068
5136
|
function validateCommands(commands) {
|
|
@@ -5254,9 +5322,9 @@ class RouterLink {
|
|
|
5254
5322
|
});
|
|
5255
5323
|
}
|
|
5256
5324
|
}
|
|
5257
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5258
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5325
|
+
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5326
|
+
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.15", type: RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: { queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
|
|
5327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterLink, decorators: [{
|
|
5260
5328
|
type: Directive,
|
|
5261
5329
|
args: [{ selector: ':not(a):not(area)[routerLink]' }]
|
|
5262
5330
|
}], ctorParameters: function () {
|
|
@@ -5375,9 +5443,9 @@ class RouterLinkWithHref {
|
|
|
5375
5443
|
});
|
|
5376
5444
|
}
|
|
5377
5445
|
}
|
|
5378
|
-
RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5379
|
-
RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5446
|
+
RouterLinkWithHref.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterLinkWithHref, deps: [{ token: Router }, { token: ActivatedRoute }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5447
|
+
RouterLinkWithHref.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.15", type: RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", state: "state", relativeTo: "relativeTo", routerLink: "routerLink" }, host: { listeners: { "click": "onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)" }, properties: { "attr.target": "this.target", "attr.href": "this.href" } }, usesOnChanges: true, ngImport: i0 });
|
|
5448
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterLinkWithHref, decorators: [{
|
|
5381
5449
|
type: Directive,
|
|
5382
5450
|
args: [{ selector: 'a[routerLink],area[routerLink]' }]
|
|
5383
5451
|
}], ctorParameters: function () { return [{ type: Router }, { type: ActivatedRoute }, { type: i3.LocationStrategy }]; }, propDecorators: { target: [{
|
|
@@ -5474,6 +5542,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14",
|
|
|
5474
5542
|
* </div>
|
|
5475
5543
|
* ```
|
|
5476
5544
|
*
|
|
5545
|
+
* The `RouterLinkActive` directive can also be used to set the aria-current attribute
|
|
5546
|
+
* to provide an alternative distinction for active elements to visually impaired users.
|
|
5547
|
+
*
|
|
5548
|
+
* For example, the following code adds the 'active' class to the Home Page link when it is
|
|
5549
|
+
* indeed active and in such case also sets its aria-current attribute to 'page':
|
|
5550
|
+
*
|
|
5551
|
+
* ```
|
|
5552
|
+
* <a routerLink="/" routerLinkActive="active" ariaCurrentWhenActive="page">Home Page</a>
|
|
5553
|
+
* ```
|
|
5554
|
+
*
|
|
5477
5555
|
* @ngModule RouterModule
|
|
5478
5556
|
*
|
|
5479
5557
|
* @publicApi
|
|
@@ -5569,6 +5647,12 @@ class RouterLinkActive {
|
|
|
5569
5647
|
this.renderer.removeClass(this.element.nativeElement, c);
|
|
5570
5648
|
}
|
|
5571
5649
|
});
|
|
5650
|
+
if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {
|
|
5651
|
+
this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());
|
|
5652
|
+
}
|
|
5653
|
+
else {
|
|
5654
|
+
this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');
|
|
5655
|
+
}
|
|
5572
5656
|
// Emit on isActiveChange after classes are updated
|
|
5573
5657
|
this.isActiveChange.emit(hasActiveLinks);
|
|
5574
5658
|
}
|
|
@@ -5588,9 +5672,9 @@ class RouterLinkActive {
|
|
|
5588
5672
|
this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);
|
|
5589
5673
|
}
|
|
5590
5674
|
}
|
|
5591
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5592
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5675
|
+
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }, { token: RouterLinkWithHref, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5676
|
+
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "14.0.0-next.15", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }, { propertyName: "linksWithHrefs", predicate: RouterLinkWithHref, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
|
|
5677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
5594
5678
|
type: Directive,
|
|
5595
5679
|
args: [{
|
|
5596
5680
|
selector: '[routerLinkActive]',
|
|
@@ -5610,6 +5694,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.14",
|
|
|
5610
5694
|
args: [RouterLinkWithHref, { descendants: true }]
|
|
5611
5695
|
}], routerLinkActiveOptions: [{
|
|
5612
5696
|
type: Input
|
|
5697
|
+
}], ariaCurrentWhenActive: [{
|
|
5698
|
+
type: Input
|
|
5613
5699
|
}], isActiveChange: [{
|
|
5614
5700
|
type: Output
|
|
5615
5701
|
}], routerLinkActive: [{
|
|
@@ -5694,9 +5780,9 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
5694
5780
|
}
|
|
5695
5781
|
}
|
|
5696
5782
|
}
|
|
5697
|
-
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5698
|
-
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5699
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5783
|
+
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5784
|
+
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
5785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
5700
5786
|
type: Injectable,
|
|
5701
5787
|
args: [{ providedIn: 'root' }]
|
|
5702
5788
|
}], ctorParameters: function () { return [{ type: i1.Title }]; } });
|
|
@@ -5782,7 +5868,7 @@ class RouterPreloader {
|
|
|
5782
5868
|
}
|
|
5783
5869
|
}
|
|
5784
5870
|
processRoutes(injector, routes) {
|
|
5785
|
-
var _a, _b;
|
|
5871
|
+
var _a, _b, _c;
|
|
5786
5872
|
const res = [];
|
|
5787
5873
|
for (const route of routes) {
|
|
5788
5874
|
if (route.providers && !route._injector) {
|
|
@@ -5791,40 +5877,49 @@ class RouterPreloader {
|
|
|
5791
5877
|
}
|
|
5792
5878
|
const injectorForCurrentRoute = (_a = route._injector) !== null && _a !== void 0 ? _a : injector;
|
|
5793
5879
|
const injectorForChildren = (_b = route._loadedInjector) !== null && _b !== void 0 ? _b : injectorForCurrentRoute;
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
res.push(this.processRoutes(injectorForChildren, route._loadedRoutes));
|
|
5797
|
-
// no config loaded, fetch the config
|
|
5798
|
-
}
|
|
5799
|
-
else if (route.loadChildren && !route.canLoad) {
|
|
5880
|
+
if ((route.loadChildren && !route._loadedRoutes) ||
|
|
5881
|
+
(route.loadComponent && !route._loadedComponent)) {
|
|
5800
5882
|
res.push(this.preloadConfig(injectorForCurrentRoute, route));
|
|
5801
|
-
// recurse into children
|
|
5802
5883
|
}
|
|
5803
|
-
else if (route.children) {
|
|
5804
|
-
res.push(this.processRoutes(injectorForChildren, route.children));
|
|
5884
|
+
else if (route.children || route._loadedRoutes) {
|
|
5885
|
+
res.push(this.processRoutes(injectorForChildren, ((_c = route.children) !== null && _c !== void 0 ? _c : route._loadedRoutes)));
|
|
5805
5886
|
}
|
|
5806
5887
|
}
|
|
5807
|
-
return from(res).pipe(mergeAll()
|
|
5888
|
+
return from(res).pipe(mergeAll());
|
|
5808
5889
|
}
|
|
5809
5890
|
preloadConfig(injector, route) {
|
|
5810
5891
|
return this.preloadingStrategy.preload(route, () => {
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
this.loader.
|
|
5814
|
-
|
|
5892
|
+
let loadedChildren$;
|
|
5893
|
+
if (route.loadChildren && route.canLoad === undefined) {
|
|
5894
|
+
loadedChildren$ = this.loader.loadChildren(injector, route);
|
|
5895
|
+
}
|
|
5896
|
+
else {
|
|
5897
|
+
loadedChildren$ = of(null);
|
|
5898
|
+
}
|
|
5899
|
+
const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap((config) => {
|
|
5815
5900
|
var _a;
|
|
5901
|
+
if (config === null) {
|
|
5902
|
+
return of(void 0);
|
|
5903
|
+
}
|
|
5816
5904
|
route._loadedRoutes = config.routes;
|
|
5817
5905
|
route._loadedInjector = config.injector;
|
|
5818
|
-
// If the loaded config was a module, use that as the module/module injector going
|
|
5819
|
-
// Otherwise, continue using the current module/module injector.
|
|
5906
|
+
// If the loaded config was a module, use that as the module/module injector going
|
|
5907
|
+
// forward. Otherwise, continue using the current module/module injector.
|
|
5820
5908
|
return this.processRoutes((_a = config.injector) !== null && _a !== void 0 ? _a : injector, config.routes);
|
|
5821
5909
|
}));
|
|
5910
|
+
if (route.loadComponent && !route._loadedComponent) {
|
|
5911
|
+
const loadComponent$ = this.loader.loadComponent(route);
|
|
5912
|
+
return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());
|
|
5913
|
+
}
|
|
5914
|
+
else {
|
|
5915
|
+
return recursiveLoadChildren$;
|
|
5916
|
+
}
|
|
5822
5917
|
});
|
|
5823
5918
|
}
|
|
5824
5919
|
}
|
|
5825
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5826
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5827
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5920
|
+
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5921
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterPreloader });
|
|
5922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
5828
5923
|
type: Injectable
|
|
5829
5924
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
|
|
5830
5925
|
|
|
@@ -5903,9 +5998,9 @@ class RouterScroller {
|
|
|
5903
5998
|
}
|
|
5904
5999
|
}
|
|
5905
6000
|
}
|
|
5906
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5907
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
5908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
6001
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
6002
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterScroller });
|
|
6003
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterScroller, decorators: [{
|
|
5909
6004
|
type: Injectable
|
|
5910
6005
|
}], ctorParameters: function () { return [{ type: Router }, { type: i3.ViewportScroller }, { type: undefined }]; } });
|
|
5911
6006
|
|
|
@@ -6047,10 +6142,10 @@ class RouterModule {
|
|
|
6047
6142
|
return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
|
|
6048
6143
|
}
|
|
6049
6144
|
}
|
|
6050
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
6051
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
6052
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
6053
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
6145
|
+
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }, { token: Router, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6146
|
+
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterModule, declarations: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
6147
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterModule });
|
|
6148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterModule, decorators: [{
|
|
6054
6149
|
type: NgModule,
|
|
6055
6150
|
args: [{
|
|
6056
6151
|
declarations: ROUTER_DIRECTIVES,
|
|
@@ -6232,9 +6327,9 @@ class RouterInitializer {
|
|
|
6232
6327
|
this.destroyed = true;
|
|
6233
6328
|
}
|
|
6234
6329
|
}
|
|
6235
|
-
RouterInitializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
6236
|
-
RouterInitializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
6237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.
|
|
6330
|
+
RouterInitializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterInitializer, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6331
|
+
RouterInitializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterInitializer });
|
|
6332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.15", ngImport: i0, type: RouterInitializer, decorators: [{
|
|
6238
6333
|
type: Injectable
|
|
6239
6334
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
6240
6335
|
function getAppInitializer(r) {
|
|
@@ -6274,7 +6369,7 @@ function provideRouterInitializer() {
|
|
|
6274
6369
|
/**
|
|
6275
6370
|
* @publicApi
|
|
6276
6371
|
*/
|
|
6277
|
-
const VERSION = new Version('14.0.0-next.
|
|
6372
|
+
const VERSION = new Version('14.0.0-next.15');
|
|
6278
6373
|
|
|
6279
6374
|
/**
|
|
6280
6375
|
* @license
|