@angular/router 16.0.0-next.1 → 16.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/apply_redirects.mjs +3 -4
- package/esm2020/src/components/empty_outlet.mjs +3 -3
- package/esm2020/src/create_url_tree.mjs +9 -9
- package/esm2020/src/create_url_tree_strategy.mjs +9 -9
- package/esm2020/src/directives/router_link.mjs +3 -3
- package/esm2020/src/directives/router_link_active.mjs +3 -3
- package/esm2020/src/directives/router_outlet.mjs +10 -16
- package/esm2020/src/navigation_transition.mjs +3 -3
- package/esm2020/src/operators/activate_routes.mjs +2 -7
- package/esm2020/src/page_title_strategy.mjs +6 -6
- package/esm2020/src/private_export.mjs +1 -2
- package/esm2020/src/route_reuse_strategy.mjs +6 -6
- package/esm2020/src/router.mjs +12 -6
- package/esm2020/src/router_config_loader.mjs +6 -6
- package/esm2020/src/router_module.mjs +4 -4
- package/esm2020/src/router_outlet_context.mjs +4 -9
- package/esm2020/src/router_preloader.mjs +9 -9
- package/esm2020/src/router_scroller.mjs +3 -3
- package/esm2020/src/url_handling_strategy.mjs +6 -6
- package/esm2020/src/url_tree.mjs +9 -9
- package/esm2020/src/utils/collection.mjs +3 -22
- package/esm2020/src/utils/config_matching.mjs +2 -3
- package/esm2020/src/utils/preactivation.mjs +5 -4
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/router_testing_harness.mjs +6 -6
- package/esm2020/testing/src/router_testing_module.mjs +5 -5
- package/fesm2015/router.mjs +112 -138
- package/fesm2015/router.mjs.map +1 -1
- package/fesm2015/testing.mjs +11 -11
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +1 -1
- package/fesm2020/router.mjs +109 -134
- package/fesm2020/router.mjs.map +1 -1
- package/fesm2020/testing.mjs +11 -11
- package/fesm2020/testing.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +1 -1
- package/index.d.ts +7 -20
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/upgrade/index.d.ts +1 -1
package/fesm2015/router.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-next.
|
|
2
|
+
* @license Angular v16.0.0-next.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
|
-
import {
|
|
9
|
-
import { from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
|
|
8
|
+
import { ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, EnvironmentInjector, Directive, Input, Output, Component, createEnvironmentInjector, ɵisNgModule, isStandalone, ɵisInjectable, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, ɵcoerceToBoolean, ɵɵsanitizeUrlOrResourceUrl, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, APP_INITIALIZER, NgProbeToken, SkipSelf, NgModule, Inject, Version } from '@angular/core';
|
|
9
|
+
import { isObservable, from, of, BehaviorSubject, EmptyError, combineLatest, concat, defer, pipe, throwError, Observable, EMPTY, ConnectableObservable, Subject } from 'rxjs';
|
|
10
10
|
import * as i3 from '@angular/common';
|
|
11
11
|
import { Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';
|
|
12
12
|
import { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, last as last$1, takeWhile, defaultIfEmpty, takeLast, mapTo, finalize, refCount, mergeAll } from 'rxjs/operators';
|
|
@@ -143,33 +143,14 @@ function equalArraysOrString(a, b) {
|
|
|
143
143
|
return a === b;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
/**
|
|
147
|
-
* Flattens single-level nested arrays.
|
|
148
|
-
*/
|
|
149
|
-
function flatten(arr) {
|
|
150
|
-
return Array.prototype.concat.apply([], arr);
|
|
151
|
-
}
|
|
152
146
|
/**
|
|
153
147
|
* Return the last element of an array.
|
|
154
148
|
*/
|
|
155
149
|
function last(a) {
|
|
156
150
|
return a.length > 0 ? a[a.length - 1] : null;
|
|
157
151
|
}
|
|
158
|
-
/**
|
|
159
|
-
* Verifys all booleans in an array are `true`.
|
|
160
|
-
*/
|
|
161
|
-
function and(bools) {
|
|
162
|
-
return !bools.some(v => !v);
|
|
163
|
-
}
|
|
164
|
-
function forEach(map, callback) {
|
|
165
|
-
for (const prop in map) {
|
|
166
|
-
if (map.hasOwnProperty(prop)) {
|
|
167
|
-
callback(map[prop], prop);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
152
|
function wrapIntoObservable(value) {
|
|
172
|
-
if (
|
|
153
|
+
if (isObservable(value)) {
|
|
173
154
|
return value;
|
|
174
155
|
}
|
|
175
156
|
if (ɵisPromise(value)) {
|
|
@@ -343,7 +324,7 @@ class UrlSegmentGroup {
|
|
|
343
324
|
this.children = children;
|
|
344
325
|
/** The parent node in the url tree */
|
|
345
326
|
this.parent = null;
|
|
346
|
-
|
|
327
|
+
Object.values(children).forEach((v) => (v.parent = this));
|
|
347
328
|
}
|
|
348
329
|
/** Whether the segment has child segments */
|
|
349
330
|
hasChildren() {
|
|
@@ -414,12 +395,12 @@ function equalPath(as, bs) {
|
|
|
414
395
|
}
|
|
415
396
|
function mapChildrenIntoArray(segment, fn) {
|
|
416
397
|
let res = [];
|
|
417
|
-
|
|
398
|
+
Object.entries(segment.children).forEach(([childOutlet, child]) => {
|
|
418
399
|
if (childOutlet === PRIMARY_OUTLET) {
|
|
419
400
|
res = res.concat(fn(child, childOutlet));
|
|
420
401
|
}
|
|
421
402
|
});
|
|
422
|
-
|
|
403
|
+
Object.entries(segment.children).forEach(([childOutlet, child]) => {
|
|
423
404
|
if (childOutlet !== PRIMARY_OUTLET) {
|
|
424
405
|
res = res.concat(fn(child, childOutlet));
|
|
425
406
|
}
|
|
@@ -440,9 +421,9 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
440
421
|
*/
|
|
441
422
|
class UrlSerializer {
|
|
442
423
|
}
|
|
443
|
-
UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
444
|
-
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
424
|
+
UrlSerializer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
425
|
+
UrlSerializer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: UrlSerializer, decorators: [{
|
|
446
427
|
type: Injectable,
|
|
447
428
|
args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]
|
|
448
429
|
}] });
|
|
@@ -491,7 +472,7 @@ function serializeSegment(segment, root) {
|
|
|
491
472
|
serializeSegment(segment.children[PRIMARY_OUTLET], false) :
|
|
492
473
|
'';
|
|
493
474
|
const children = [];
|
|
494
|
-
|
|
475
|
+
Object.entries(segment.children).forEach(([k, v]) => {
|
|
495
476
|
if (k !== PRIMARY_OUTLET) {
|
|
496
477
|
children.push(`${k}:${serializeSegment(v, false)}`);
|
|
497
478
|
}
|
|
@@ -932,7 +913,7 @@ function isCommandWithOutlets(command) {
|
|
|
932
913
|
function tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {
|
|
933
914
|
let qp = {};
|
|
934
915
|
if (queryParams) {
|
|
935
|
-
forEach(
|
|
916
|
+
Object.entries(queryParams).forEach(([name, value]) => {
|
|
936
917
|
qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`;
|
|
937
918
|
});
|
|
938
919
|
}
|
|
@@ -955,7 +936,7 @@ function tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment)
|
|
|
955
936
|
*/
|
|
956
937
|
function replaceSegment(current, oldSegment, newSegment) {
|
|
957
938
|
const children = {};
|
|
958
|
-
|
|
939
|
+
Object.entries(current.children).forEach(([outletName, c]) => {
|
|
959
940
|
if (c === oldSegment) {
|
|
960
941
|
children[outletName] = newSegment;
|
|
961
942
|
}
|
|
@@ -993,7 +974,7 @@ function computeNavigation(commands) {
|
|
|
993
974
|
if (typeof cmd === 'object' && cmd != null) {
|
|
994
975
|
if (cmd.outlets) {
|
|
995
976
|
const outlets = {};
|
|
996
|
-
|
|
977
|
+
Object.entries(cmd.outlets).forEach(([name, commands]) => {
|
|
997
978
|
outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;
|
|
998
979
|
});
|
|
999
980
|
return [...res, { outlets }];
|
|
@@ -1146,7 +1127,7 @@ function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {
|
|
|
1146
1127
|
segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {
|
|
1147
1128
|
return updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);
|
|
1148
1129
|
}
|
|
1149
|
-
forEach(
|
|
1130
|
+
Object.entries(outlets).forEach(([outlet, commands]) => {
|
|
1150
1131
|
if (typeof commands === 'string') {
|
|
1151
1132
|
commands = [commands];
|
|
1152
1133
|
}
|
|
@@ -1154,7 +1135,7 @@ function updateSegmentGroupChildren(segmentGroup, startIndex, commands) {
|
|
|
1154
1135
|
children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);
|
|
1155
1136
|
}
|
|
1156
1137
|
});
|
|
1157
|
-
|
|
1138
|
+
Object.entries(segmentGroup.children).forEach(([childOutlet, child]) => {
|
|
1158
1139
|
if (outlets[childOutlet] === undefined) {
|
|
1159
1140
|
children[childOutlet] = child;
|
|
1160
1141
|
}
|
|
@@ -1226,7 +1207,7 @@ function createNewSegmentGroup(segmentGroup, startIndex, commands) {
|
|
|
1226
1207
|
}
|
|
1227
1208
|
function createNewSegmentChildren(outlets) {
|
|
1228
1209
|
const children = {};
|
|
1229
|
-
forEach(
|
|
1210
|
+
Object.entries(outlets).forEach(([outlet, commands]) => {
|
|
1230
1211
|
if (typeof commands === 'string') {
|
|
1231
1212
|
commands = [commands];
|
|
1232
1213
|
}
|
|
@@ -1238,7 +1219,7 @@ function createNewSegmentChildren(outlets) {
|
|
|
1238
1219
|
}
|
|
1239
1220
|
function stringify(params) {
|
|
1240
1221
|
const res = {};
|
|
1241
|
-
forEach(
|
|
1222
|
+
Object.entries(params).forEach(([k, v]) => res[k] = `${v}`);
|
|
1242
1223
|
return res;
|
|
1243
1224
|
}
|
|
1244
1225
|
function compare(path, params, segment) {
|
|
@@ -1765,9 +1746,9 @@ class LegacyCreateUrlTree {
|
|
|
1765
1746
|
return tree;
|
|
1766
1747
|
}
|
|
1767
1748
|
}
|
|
1768
|
-
LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1769
|
-
LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1749
|
+
LegacyCreateUrlTree.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: LegacyCreateUrlTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1750
|
+
LegacyCreateUrlTree.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: LegacyCreateUrlTree });
|
|
1751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: LegacyCreateUrlTree, decorators: [{
|
|
1771
1752
|
type: Injectable
|
|
1772
1753
|
}] });
|
|
1773
1754
|
class CreateUrlTreeUsingSnapshot {
|
|
@@ -1798,16 +1779,16 @@ class CreateUrlTreeUsingSnapshot {
|
|
|
1798
1779
|
return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);
|
|
1799
1780
|
}
|
|
1800
1781
|
}
|
|
1801
|
-
CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1802
|
-
CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1782
|
+
CreateUrlTreeUsingSnapshot.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1783
|
+
CreateUrlTreeUsingSnapshot.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot });
|
|
1784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: CreateUrlTreeUsingSnapshot, decorators: [{
|
|
1804
1785
|
type: Injectable
|
|
1805
1786
|
}] });
|
|
1806
1787
|
class CreateUrlTreeStrategy {
|
|
1807
1788
|
}
|
|
1808
|
-
CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1809
|
-
CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1810
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
1789
|
+
CreateUrlTreeStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1790
|
+
CreateUrlTreeStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, providedIn: 'root', useClass: CreateUrlTreeUsingSnapshot });
|
|
1791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: CreateUrlTreeStrategy, decorators: [{
|
|
1811
1792
|
type: Injectable,
|
|
1812
1793
|
args: [{ providedIn: 'root', useClass: CreateUrlTreeUsingSnapshot }]
|
|
1813
1794
|
}] });
|
|
@@ -2375,11 +2356,6 @@ class OutletContext {
|
|
|
2375
2356
|
constructor() {
|
|
2376
2357
|
this.outlet = null;
|
|
2377
2358
|
this.route = null;
|
|
2378
|
-
/**
|
|
2379
|
-
* @deprecated Passing a resolver to retrieve a component factory is not required and is
|
|
2380
|
-
* deprecated since v14.
|
|
2381
|
-
*/
|
|
2382
|
-
this.resolver = null;
|
|
2383
2359
|
this.injector = null;
|
|
2384
2360
|
this.children = new ChildrenOutletContexts();
|
|
2385
2361
|
this.attachRef = null;
|
|
@@ -2437,9 +2413,9 @@ class ChildrenOutletContexts {
|
|
|
2437
2413
|
return this.contexts.get(childName) || null;
|
|
2438
2414
|
}
|
|
2439
2415
|
}
|
|
2440
|
-
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2441
|
-
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2416
|
+
ChildrenOutletContexts.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ChildrenOutletContexts, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2417
|
+
ChildrenOutletContexts.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });
|
|
2418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ChildrenOutletContexts, decorators: [{
|
|
2443
2419
|
type: Injectable,
|
|
2444
2420
|
args: [{ providedIn: 'root' }]
|
|
2445
2421
|
}] });
|
|
@@ -2629,7 +2605,7 @@ class RouterOutlet {
|
|
|
2629
2605
|
this.deactivateEvents.emit(c);
|
|
2630
2606
|
}
|
|
2631
2607
|
}
|
|
2632
|
-
activateWith(activatedRoute,
|
|
2608
|
+
activateWith(activatedRoute, environmentInjector) {
|
|
2633
2609
|
if (this.isActivated) {
|
|
2634
2610
|
throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, NG_DEV_MODE$8 && 'Cannot activate an already activated outlet');
|
|
2635
2611
|
}
|
|
@@ -2639,23 +2615,20 @@ class RouterOutlet {
|
|
|
2639
2615
|
const component = snapshot.component;
|
|
2640
2616
|
const childContexts = this.parentContexts.getOrCreateContext(this.name).children;
|
|
2641
2617
|
const injector = new OutletInjector(activatedRoute, childContexts, location.injector);
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
const environmentInjector = resolverOrInjector !== null && resolverOrInjector !== void 0 ? resolverOrInjector : this.environmentInjector;
|
|
2648
|
-
this.activated = location.createComponent(component, { index: location.length, injector, environmentInjector });
|
|
2649
|
-
}
|
|
2618
|
+
this.activated = location.createComponent(component, {
|
|
2619
|
+
index: location.length,
|
|
2620
|
+
injector,
|
|
2621
|
+
environmentInjector: environmentInjector !== null && environmentInjector !== void 0 ? environmentInjector : this.environmentInjector
|
|
2622
|
+
});
|
|
2650
2623
|
// Calling `markForCheck` to make sure we will run the change detection when the
|
|
2651
2624
|
// `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.
|
|
2652
2625
|
this.changeDetector.markForCheck();
|
|
2653
2626
|
this.activateEvents.emit(this.activated.instance);
|
|
2654
2627
|
}
|
|
2655
2628
|
}
|
|
2656
|
-
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2657
|
-
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
2658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2629
|
+
RouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2630
|
+
RouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.3", type: RouterOutlet, isStandalone: true, selector: "router-outlet", inputs: { name: "name" }, outputs: { activateEvents: "activate", deactivateEvents: "deactivate", attachEvents: "attach", detachEvents: "detach" }, exportAs: ["outlet"], usesOnChanges: true, ngImport: i0 });
|
|
2631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterOutlet, decorators: [{
|
|
2659
2632
|
type: Directive,
|
|
2660
2633
|
args: [{
|
|
2661
2634
|
selector: 'router-outlet',
|
|
@@ -2693,9 +2666,6 @@ class OutletInjector {
|
|
|
2693
2666
|
return this.parent.get(token, notFoundValue);
|
|
2694
2667
|
}
|
|
2695
2668
|
}
|
|
2696
|
-
function isComponentFactoryResolver(item) {
|
|
2697
|
-
return !!item.resolveComponentFactory;
|
|
2698
|
-
}
|
|
2699
2669
|
|
|
2700
2670
|
/**
|
|
2701
2671
|
* This component is used internally within the router to be a placeholder when an empty
|
|
@@ -2708,9 +2678,9 @@ function isComponentFactoryResolver(item) {
|
|
|
2708
2678
|
*/
|
|
2709
2679
|
class ɵEmptyOutletComponent {
|
|
2710
2680
|
}
|
|
2711
|
-
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2712
|
-
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
2713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
2681
|
+
ɵEmptyOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2682
|
+
ɵEmptyOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0-next.3", type: ɵEmptyOutletComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] });
|
|
2683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{
|
|
2714
2684
|
type: Component,
|
|
2715
2685
|
args: [{
|
|
2716
2686
|
template: `<router-outlet></router-outlet>`,
|
|
@@ -2937,7 +2907,7 @@ class ActivateRoutes {
|
|
|
2937
2907
|
delete children[childOutletName];
|
|
2938
2908
|
});
|
|
2939
2909
|
// De-activate the routes that will not be re-used
|
|
2940
|
-
|
|
2910
|
+
Object.values(children).forEach((v) => {
|
|
2941
2911
|
this.deactivateRouteAndItsChildren(v, contexts);
|
|
2942
2912
|
});
|
|
2943
2913
|
}
|
|
@@ -3005,7 +2975,6 @@ class ActivateRoutes {
|
|
|
3005
2975
|
// Clear the information about the attached component on the context but keep the reference to
|
|
3006
2976
|
// the outlet.
|
|
3007
2977
|
context.attachRef = null;
|
|
3008
|
-
context.resolver = null;
|
|
3009
2978
|
context.route = null;
|
|
3010
2979
|
}
|
|
3011
2980
|
}
|
|
@@ -3020,7 +2989,6 @@ class ActivateRoutes {
|
|
|
3020
2989
|
}
|
|
3021
2990
|
}
|
|
3022
2991
|
activateRoutes(futureNode, currNode, parentContexts) {
|
|
3023
|
-
var _a;
|
|
3024
2992
|
const future = futureNode.value;
|
|
3025
2993
|
const curr = currNode ? currNode.value : null;
|
|
3026
2994
|
advanceActivatedRoute(future);
|
|
@@ -3056,10 +3024,8 @@ class ActivateRoutes {
|
|
|
3056
3024
|
}
|
|
3057
3025
|
else {
|
|
3058
3026
|
const injector = getClosestRouteInjector(future.snapshot);
|
|
3059
|
-
const cmpFactoryResolver = (_a = injector === null || injector === void 0 ? void 0 : injector.get(ComponentFactoryResolver)) !== null && _a !== void 0 ? _a : null;
|
|
3060
3027
|
context.attachRef = null;
|
|
3061
3028
|
context.route = future;
|
|
3062
|
-
context.resolver = cmpFactoryResolver;
|
|
3063
3029
|
context.injector = injector;
|
|
3064
3030
|
if (context.outlet) {
|
|
3065
3031
|
// Activate the outlet when it has already been instantiated
|
|
@@ -3126,7 +3092,8 @@ function getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks
|
|
|
3126
3092
|
delete prevChildren[c.value.outlet];
|
|
3127
3093
|
});
|
|
3128
3094
|
// Process any children left from the current route (not active for the future route)
|
|
3129
|
-
|
|
3095
|
+
Object.entries(prevChildren)
|
|
3096
|
+
.forEach(([k, v]) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));
|
|
3130
3097
|
return checks;
|
|
3131
3098
|
}
|
|
3132
3099
|
function getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {
|
|
@@ -3198,7 +3165,7 @@ function shouldRunGuardsAndResolvers(curr, future, mode) {
|
|
|
3198
3165
|
function deactivateRouteAndItsChildren(route, context, checks) {
|
|
3199
3166
|
const children = nodeChildrenAsMap(route);
|
|
3200
3167
|
const r = route.value;
|
|
3201
|
-
forEach(
|
|
3168
|
+
Object.entries(children).forEach(([childName, node]) => {
|
|
3202
3169
|
if (!r.component) {
|
|
3203
3170
|
deactivateRouteAndItsChildren(node, context, checks);
|
|
3204
3171
|
}
|
|
@@ -3455,7 +3422,7 @@ function matchWithChecks(segmentGroup, route, segments, injector, urlSerializer)
|
|
|
3455
3422
|
.pipe(map((v) => v === true ? result : Object.assign({}, noMatch$1)));
|
|
3456
3423
|
}
|
|
3457
3424
|
function match(segmentGroup, route, segments) {
|
|
3458
|
-
var _a;
|
|
3425
|
+
var _a, _b;
|
|
3459
3426
|
if (route.path === '') {
|
|
3460
3427
|
if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {
|
|
3461
3428
|
return Object.assign({}, noMatch$1);
|
|
@@ -3473,7 +3440,7 @@ function match(segmentGroup, route, segments) {
|
|
|
3473
3440
|
if (!res)
|
|
3474
3441
|
return Object.assign({}, noMatch$1);
|
|
3475
3442
|
const posParams = {};
|
|
3476
|
-
|
|
3443
|
+
Object.entries((_a = res.posParams) !== null && _a !== void 0 ? _a : {}).forEach(([k, v]) => {
|
|
3477
3444
|
posParams[k] = v.path;
|
|
3478
3445
|
});
|
|
3479
3446
|
const parameters = res.consumed.length > 0 ? Object.assign(Object.assign({}, posParams), res.consumed[res.consumed.length - 1].parameters) :
|
|
@@ -3484,7 +3451,7 @@ function match(segmentGroup, route, segments) {
|
|
|
3484
3451
|
remainingSegments: segments.slice(res.consumed.length),
|
|
3485
3452
|
// TODO(atscott): investigate combining parameters and positionalParamSegments
|
|
3486
3453
|
parameters,
|
|
3487
|
-
positionalParamSegments: (
|
|
3454
|
+
positionalParamSegments: (_b = res.posParams) !== null && _b !== void 0 ? _b : {}
|
|
3488
3455
|
};
|
|
3489
3456
|
}
|
|
3490
3457
|
function split(segmentGroup, consumedSegments, slicedSegments, config) {
|
|
@@ -3848,7 +3815,7 @@ class ApplyRedirects {
|
|
|
3848
3815
|
}
|
|
3849
3816
|
createQueryParams(redirectToParams, actualParams) {
|
|
3850
3817
|
const res = {};
|
|
3851
|
-
forEach(
|
|
3818
|
+
Object.entries(redirectToParams).forEach(([k, v]) => {
|
|
3852
3819
|
const copySourceValue = typeof v === 'string' && v.startsWith(':');
|
|
3853
3820
|
if (copySourceValue) {
|
|
3854
3821
|
const sourceName = v.substring(1);
|
|
@@ -3863,7 +3830,7 @@ class ApplyRedirects {
|
|
|
3863
3830
|
createSegmentGroup(redirectTo, group, segments, posParams) {
|
|
3864
3831
|
const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);
|
|
3865
3832
|
let children = {};
|
|
3866
|
-
|
|
3833
|
+
Object.entries(group.children).forEach(([name, child]) => {
|
|
3867
3834
|
children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);
|
|
3868
3835
|
});
|
|
3869
3836
|
return new UrlSegmentGroup(updatedSegments, children);
|
|
@@ -4338,7 +4305,7 @@ class RouterConfigLoader {
|
|
|
4338
4305
|
// will get stuck in an infinite loop. The child module's Injector will look to
|
|
4339
4306
|
// its parent `Injector` when it doesn't find any ROUTES so it will return routes
|
|
4340
4307
|
// for it's parent module instead.
|
|
4341
|
-
rawRoutes =
|
|
4308
|
+
rawRoutes = injector.get(ROUTES, [], InjectFlags.Self | InjectFlags.Optional).flat();
|
|
4342
4309
|
}
|
|
4343
4310
|
const routes = rawRoutes.map(standardizeConfig);
|
|
4344
4311
|
NG_DEV_MODE$5 && validateConfig(routes, route.path, requireStandaloneComponents);
|
|
@@ -4368,9 +4335,9 @@ class RouterConfigLoader {
|
|
|
4368
4335
|
}));
|
|
4369
4336
|
}
|
|
4370
4337
|
}
|
|
4371
|
-
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4372
|
-
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4338
|
+
RouterConfigLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterConfigLoader, deps: [{ token: i0.Injector }, { token: i0.Compiler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4339
|
+
RouterConfigLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });
|
|
4340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterConfigLoader, decorators: [{
|
|
4374
4341
|
type: Injectable,
|
|
4375
4342
|
args: [{ providedIn: 'root' }]
|
|
4376
4343
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }]; } });
|
|
@@ -4743,9 +4710,9 @@ class NavigationTransitions {
|
|
|
4743
4710
|
t.resolve(false);
|
|
4744
4711
|
}
|
|
4745
4712
|
}
|
|
4746
|
-
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4747
|
-
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4748
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4713
|
+
NavigationTransitions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4714
|
+
NavigationTransitions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });
|
|
4715
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: NavigationTransitions, decorators: [{
|
|
4749
4716
|
type: Injectable,
|
|
4750
4717
|
args: [{ providedIn: 'root' }]
|
|
4751
4718
|
}], ctorParameters: function () { return []; } });
|
|
@@ -4798,9 +4765,9 @@ class TitleStrategy {
|
|
|
4798
4765
|
return snapshot.data[RouteTitleKey];
|
|
4799
4766
|
}
|
|
4800
4767
|
}
|
|
4801
|
-
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4802
|
-
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4768
|
+
TitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4769
|
+
TitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });
|
|
4770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: TitleStrategy, decorators: [{
|
|
4804
4771
|
type: Injectable,
|
|
4805
4772
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]
|
|
4806
4773
|
}] });
|
|
@@ -4824,9 +4791,9 @@ class DefaultTitleStrategy extends TitleStrategy {
|
|
|
4824
4791
|
}
|
|
4825
4792
|
}
|
|
4826
4793
|
}
|
|
4827
|
-
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4828
|
-
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4794
|
+
DefaultTitleStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4795
|
+
DefaultTitleStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });
|
|
4796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultTitleStrategy, decorators: [{
|
|
4830
4797
|
type: Injectable,
|
|
4831
4798
|
args: [{ providedIn: 'root' }]
|
|
4832
4799
|
}], ctorParameters: function () { return [{ type: i1.Title }]; } });
|
|
@@ -4840,9 +4807,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1",
|
|
|
4840
4807
|
*/
|
|
4841
4808
|
class RouteReuseStrategy {
|
|
4842
4809
|
}
|
|
4843
|
-
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4844
|
-
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4845
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4810
|
+
RouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4811
|
+
RouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });
|
|
4812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouteReuseStrategy, decorators: [{
|
|
4846
4813
|
type: Injectable,
|
|
4847
4814
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]
|
|
4848
4815
|
}] });
|
|
@@ -4894,9 +4861,9 @@ class BaseRouteReuseStrategy {
|
|
|
4894
4861
|
}
|
|
4895
4862
|
class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {
|
|
4896
4863
|
}
|
|
4897
|
-
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4898
|
-
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4864
|
+
DefaultRouteReuseStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4865
|
+
DefaultRouteReuseStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });
|
|
4866
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{
|
|
4900
4867
|
type: Injectable,
|
|
4901
4868
|
args: [{ providedIn: 'root' }]
|
|
4902
4869
|
}] });
|
|
@@ -4921,9 +4888,9 @@ const ROUTER_CONFIGURATION = new InjectionToken(NG_DEV_MODE$3 ? 'router config'
|
|
|
4921
4888
|
*/
|
|
4922
4889
|
class UrlHandlingStrategy {
|
|
4923
4890
|
}
|
|
4924
|
-
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4925
|
-
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4926
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4891
|
+
UrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4892
|
+
UrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });
|
|
4893
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: UrlHandlingStrategy, decorators: [{
|
|
4927
4894
|
type: Injectable,
|
|
4928
4895
|
args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]
|
|
4929
4896
|
}] });
|
|
@@ -4941,9 +4908,9 @@ class DefaultUrlHandlingStrategy {
|
|
|
4941
4908
|
return newUrlPart;
|
|
4942
4909
|
}
|
|
4943
4910
|
}
|
|
4944
|
-
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4945
|
-
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4946
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
4911
|
+
DefaultUrlHandlingStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4912
|
+
DefaultUrlHandlingStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });
|
|
4913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{
|
|
4947
4914
|
type: Injectable,
|
|
4948
4915
|
args: [{ providedIn: 'root' }]
|
|
4949
4916
|
}] });
|
|
@@ -5013,7 +4980,7 @@ class Router {
|
|
|
5013
4980
|
return this.navigationTransitions.events;
|
|
5014
4981
|
}
|
|
5015
4982
|
constructor() {
|
|
5016
|
-
var _a;
|
|
4983
|
+
var _a, _b;
|
|
5017
4984
|
this.disposed = false;
|
|
5018
4985
|
/**
|
|
5019
4986
|
* The id of the currently active page in the router.
|
|
@@ -5141,7 +5108,7 @@ class Router {
|
|
|
5141
5108
|
* @see `RouterModule`
|
|
5142
5109
|
*/
|
|
5143
5110
|
this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';
|
|
5144
|
-
this.config =
|
|
5111
|
+
this.config = (_b = (_a = inject(ROUTES, { optional: true })) === null || _a === void 0 ? void 0 : _a.flat()) !== null && _b !== void 0 ? _b : [];
|
|
5145
5112
|
this.navigationTransitions = inject(NavigationTransitions);
|
|
5146
5113
|
this.urlSerializer = inject(UrlSerializer);
|
|
5147
5114
|
this.location = inject(Location);
|
|
@@ -5238,6 +5205,13 @@ class Router {
|
|
|
5238
5205
|
getCurrentNavigation() {
|
|
5239
5206
|
return this.navigationTransitions.currentNavigation;
|
|
5240
5207
|
}
|
|
5208
|
+
/**
|
|
5209
|
+
* The `Navigation` object of the most recent navigation to succeed and `null` if there
|
|
5210
|
+
* has not been a successful navigation yet.
|
|
5211
|
+
*/
|
|
5212
|
+
get lastSuccessfulNavigation() {
|
|
5213
|
+
return this.navigationTransitions.lastSuccessfulNavigation;
|
|
5214
|
+
}
|
|
5241
5215
|
/**
|
|
5242
5216
|
* Resets the route configuration used for navigation and generating links.
|
|
5243
5217
|
*
|
|
@@ -5594,9 +5568,9 @@ class Router {
|
|
|
5594
5568
|
return { navigationId };
|
|
5595
5569
|
}
|
|
5596
5570
|
}
|
|
5597
|
-
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5598
|
-
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5571
|
+
Router.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5572
|
+
Router.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: Router, providedIn: 'root' });
|
|
5573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: Router, decorators: [{
|
|
5600
5574
|
type: Injectable,
|
|
5601
5575
|
args: [{ providedIn: 'root' }]
|
|
5602
5576
|
}], ctorParameters: function () { return []; } });
|
|
@@ -5885,9 +5859,9 @@ class RouterLink {
|
|
|
5885
5859
|
});
|
|
5886
5860
|
}
|
|
5887
5861
|
}
|
|
5888
|
-
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5889
|
-
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
5890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
5862
|
+
RouterLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5863
|
+
RouterLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.3", type: RouterLink, isStandalone: true, selector: "[routerLink]", inputs: { target: "target", queryParams: "queryParams", fragment: "fragment", queryParamsHandling: "queryParamsHandling", state: "state", relativeTo: "relativeTo", preserveFragment: "preserveFragment", skipLocationChange: "skipLocationChange", replaceUrl: "replaceUrl", 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 });
|
|
5864
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterLink, decorators: [{
|
|
5891
5865
|
type: Directive,
|
|
5892
5866
|
args: [{
|
|
5893
5867
|
selector: '[routerLink]',
|
|
@@ -6112,9 +6086,9 @@ class RouterLinkActive {
|
|
|
6112
6086
|
return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);
|
|
6113
6087
|
}
|
|
6114
6088
|
}
|
|
6115
|
-
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6116
|
-
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
6117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6089
|
+
RouterLinkActive.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6090
|
+
RouterLinkActive.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0-next.3", type: RouterLinkActive, isStandalone: true, selector: "[routerLinkActive]", inputs: { routerLinkActiveOptions: "routerLinkActiveOptions", ariaCurrentWhenActive: "ariaCurrentWhenActive", routerLinkActive: "routerLinkActive" }, outputs: { isActiveChange: "isActiveChange" }, queries: [{ propertyName: "links", predicate: RouterLink, descendants: true }], exportAs: ["routerLinkActive"], usesOnChanges: true, ngImport: i0 });
|
|
6091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterLinkActive, decorators: [{
|
|
6118
6092
|
type: Directive,
|
|
6119
6093
|
args: [{
|
|
6120
6094
|
selector: '[routerLinkActive]',
|
|
@@ -6169,9 +6143,9 @@ class PreloadAllModules {
|
|
|
6169
6143
|
return fn().pipe(catchError(() => of(null)));
|
|
6170
6144
|
}
|
|
6171
6145
|
}
|
|
6172
|
-
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6173
|
-
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6146
|
+
PreloadAllModules.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6147
|
+
PreloadAllModules.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });
|
|
6148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: PreloadAllModules, decorators: [{
|
|
6175
6149
|
type: Injectable,
|
|
6176
6150
|
args: [{ providedIn: 'root' }]
|
|
6177
6151
|
}] });
|
|
@@ -6189,9 +6163,9 @@ class NoPreloading {
|
|
|
6189
6163
|
return of(null);
|
|
6190
6164
|
}
|
|
6191
6165
|
}
|
|
6192
|
-
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6193
|
-
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6166
|
+
NoPreloading.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6167
|
+
NoPreloading.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: NoPreloading, providedIn: 'root' });
|
|
6168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: NoPreloading, decorators: [{
|
|
6195
6169
|
type: Injectable,
|
|
6196
6170
|
args: [{ providedIn: 'root' }]
|
|
6197
6171
|
}] });
|
|
@@ -6287,9 +6261,9 @@ class RouterPreloader {
|
|
|
6287
6261
|
});
|
|
6288
6262
|
}
|
|
6289
6263
|
}
|
|
6290
|
-
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6291
|
-
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6264
|
+
RouterPreloader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6265
|
+
RouterPreloader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterPreloader, providedIn: 'root' });
|
|
6266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterPreloader, decorators: [{
|
|
6293
6267
|
type: Injectable,
|
|
6294
6268
|
args: [{ providedIn: 'root' }]
|
|
6295
6269
|
}], ctorParameters: function () { return [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }]; } });
|
|
@@ -6384,9 +6358,9 @@ class RouterScroller {
|
|
|
6384
6358
|
(_b = this.scrollEventsSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
6385
6359
|
}
|
|
6386
6360
|
}
|
|
6387
|
-
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6388
|
-
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6361
|
+
RouterScroller.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterScroller, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
6362
|
+
RouterScroller.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterScroller });
|
|
6363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterScroller, decorators: [{
|
|
6390
6364
|
type: Injectable
|
|
6391
6365
|
}], ctorParameters: function () { return [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }]; } });
|
|
6392
6366
|
|
|
@@ -6995,10 +6969,10 @@ class RouterModule {
|
|
|
6995
6969
|
};
|
|
6996
6970
|
}
|
|
6997
6971
|
}
|
|
6998
|
-
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6999
|
-
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.
|
|
7000
|
-
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
7001
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
|
6972
|
+
RouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6973
|
+
RouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });
|
|
6974
|
+
RouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterModule, imports: [ɵEmptyOutletComponent] });
|
|
6975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.3", ngImport: i0, type: RouterModule, decorators: [{
|
|
7002
6976
|
type: NgModule,
|
|
7003
6977
|
args: [{
|
|
7004
6978
|
imports: ROUTER_DIRECTIVES,
|
|
@@ -7145,7 +7119,7 @@ function mapToResolve(provider) {
|
|
|
7145
7119
|
/**
|
|
7146
7120
|
* @publicApi
|
|
7147
7121
|
*/
|
|
7148
|
-
const VERSION = new Version('16.0.0-next.
|
|
7122
|
+
const VERSION = new Version('16.0.0-next.3');
|
|
7149
7123
|
|
|
7150
7124
|
/**
|
|
7151
7125
|
* @module
|
|
@@ -7160,5 +7134,5 @@ const VERSION = new Version('16.0.0-next.1');
|
|
|
7160
7134
|
* Generated bundle index. Do not edit.
|
|
7161
7135
|
*/
|
|
7162
7136
|
|
|
7163
|
-
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation,
|
|
7137
|
+
export { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationSkipped, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve, provideRouter, provideRoutes, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, withPreloading as ɵwithPreloading };
|
|
7164
7138
|
//# sourceMappingURL=router.mjs.map
|