@angular/router 8.2.1 → 8.2.5
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/bundles/router-testing.umd.js +151 -1
- package/bundles/router-testing.umd.js.map +1 -1
- package/bundles/router-testing.umd.min.js +1 -1
- package/bundles/router-testing.umd.min.js.map +1 -1
- package/bundles/router-upgrade.umd.js +1 -1
- package/bundles/router-upgrade.umd.min.js +1 -1
- package/bundles/router-upgrade.umd.min.js.map +1 -1
- package/bundles/router.umd.js +114 -5
- package/bundles/router.umd.js.map +1 -1
- package/bundles/router.umd.min.js +4 -3
- package/bundles/router.umd.min.js.map +1 -1
- package/esm2015/router.externs.js +2 -2
- package/esm2015/src/events.js +5 -2
- package/esm2015/src/router.js +2 -2
- package/esm2015/src/version.js +1 -1
- package/esm5/src/events.js +5 -2
- package/esm5/src/router.js +2 -2
- package/esm5/src/version.js +1 -1
- package/fesm2015/router.js +1907 -37
- package/fesm2015/router.js.map +1 -1
- package/fesm2015/testing.js +14 -1
- package/fesm2015/testing.js.map +1 -1
- package/fesm2015/upgrade.js +1 -1
- package/fesm5/router.js +18 -7
- package/fesm5/router.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/fesm5/upgrade.js +1 -1
- package/package.json +4 -4
- package/router.d.ts +6 -3
- package/router.metadata.json +1 -1
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
- package/upgrade/upgrade.d.ts +1 -1
- package/upgrade.d.ts +1 -1
package/fesm2015/router.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v8.2.
|
|
2
|
+
* @license Angular v8.2.5
|
|
3
3
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { LocationStrategy, Location, PlatformLocation, APP_BASE_HREF, ViewportScroller, HashLocationStrategy, PathLocationStrategy, LOCATION_INITIALIZED } from '@angular/common';
|
|
8
8
|
import { Component, ɵisObservable, ɵisPromise, NgModuleRef, InjectionToken, NgModuleFactory, ɵConsole, NgZone, isDevMode, Directive, Attribute, Renderer2, ElementRef, Input, HostListener, HostBinding, Optional, ContentChildren, EventEmitter, ViewContainerRef, ComponentFactoryResolver, ChangeDetectorRef, Output, Injectable, NgModuleFactoryLoader, Compiler, Injector, ApplicationRef, SystemJsNgModuleLoader, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, Inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, Version } from '@angular/core';
|
|
9
|
-
import { of, from, BehaviorSubject,
|
|
9
|
+
import { of, from, BehaviorSubject, Observable, EmptyError, combineLatest, defer, Subject, EMPTY } from 'rxjs';
|
|
10
10
|
import { map, concatAll, last as last$1, catchError, first, mergeMap, every, switchMap, take, startWith, scan, filter, concatMap, reduce, tap, finalize, mergeAll } from 'rxjs/operators';
|
|
11
11
|
import { ɵgetDOM } from '@angular/platform-browser';
|
|
12
12
|
|
|
@@ -52,6 +52,18 @@ class RouterEvent {
|
|
|
52
52
|
this.url = url;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
if (false) {
|
|
56
|
+
/**
|
|
57
|
+
* A unique ID that the router assigns to every router navigation.
|
|
58
|
+
* @type {?}
|
|
59
|
+
*/
|
|
60
|
+
RouterEvent.prototype.id;
|
|
61
|
+
/**
|
|
62
|
+
* The URL that is the destination for this navigation.
|
|
63
|
+
* @type {?}
|
|
64
|
+
*/
|
|
65
|
+
RouterEvent.prototype.url;
|
|
66
|
+
}
|
|
55
67
|
/**
|
|
56
68
|
* An event triggered when a navigation starts.
|
|
57
69
|
*
|
|
@@ -83,6 +95,34 @@ class NavigationStart extends RouterEvent {
|
|
|
83
95
|
*/
|
|
84
96
|
toString() { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }
|
|
85
97
|
}
|
|
98
|
+
if (false) {
|
|
99
|
+
/**
|
|
100
|
+
* Identifies the call or event that triggered the navigation.
|
|
101
|
+
* An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.
|
|
102
|
+
*
|
|
103
|
+
* @type {?}
|
|
104
|
+
*/
|
|
105
|
+
NavigationStart.prototype.navigationTrigger;
|
|
106
|
+
/**
|
|
107
|
+
* The navigation state that was previously supplied to the `pushState` call,
|
|
108
|
+
* when the navigation is triggered by a `popstate` event. Otherwise null.
|
|
109
|
+
*
|
|
110
|
+
* The state object is defined by `NavigationExtras`, and contains any
|
|
111
|
+
* developer-defined state value, as well as a unique ID that
|
|
112
|
+
* the router assigns to every router transition/navigation.
|
|
113
|
+
*
|
|
114
|
+
* From the perspective of the router, the router never "goes back".
|
|
115
|
+
* When the user clicks on the back button in the browser,
|
|
116
|
+
* a new navigation ID is created.
|
|
117
|
+
*
|
|
118
|
+
* Use the ID in this previous-state object to differentiate between a newly created
|
|
119
|
+
* state and one returned to by a `popstate` event, so that you can restore some
|
|
120
|
+
* remembered state, such as scroll position.
|
|
121
|
+
*
|
|
122
|
+
* @type {?}
|
|
123
|
+
*/
|
|
124
|
+
NavigationStart.prototype.restoredState;
|
|
125
|
+
}
|
|
86
126
|
/**
|
|
87
127
|
* An event triggered when a navigation ends successfully.
|
|
88
128
|
*
|
|
@@ -110,8 +150,18 @@ class NavigationEnd extends RouterEvent {
|
|
|
110
150
|
return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;
|
|
111
151
|
}
|
|
112
152
|
}
|
|
153
|
+
if (false) {
|
|
154
|
+
/**
|
|
155
|
+
* \@docsNotRequired
|
|
156
|
+
* @type {?}
|
|
157
|
+
*/
|
|
158
|
+
NavigationEnd.prototype.urlAfterRedirects;
|
|
159
|
+
}
|
|
113
160
|
/**
|
|
114
|
-
* An event triggered when a navigation is canceled.
|
|
161
|
+
* An event triggered when a navigation is canceled, directly or indirectly.
|
|
162
|
+
*
|
|
163
|
+
* This can happen when a [route guard](guide/router#milestone-5-route-guards)
|
|
164
|
+
* returns `false` or initiates a redirect by returning a `UrlTree`.
|
|
115
165
|
*
|
|
116
166
|
* \@publicApi
|
|
117
167
|
*/
|
|
@@ -135,6 +185,13 @@ class NavigationCancel extends RouterEvent {
|
|
|
135
185
|
*/
|
|
136
186
|
toString() { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }
|
|
137
187
|
}
|
|
188
|
+
if (false) {
|
|
189
|
+
/**
|
|
190
|
+
* \@docsNotRequired
|
|
191
|
+
* @type {?}
|
|
192
|
+
*/
|
|
193
|
+
NavigationCancel.prototype.reason;
|
|
194
|
+
}
|
|
138
195
|
/**
|
|
139
196
|
* An event triggered when a navigation fails due to an unexpected error.
|
|
140
197
|
*
|
|
@@ -162,6 +219,13 @@ class NavigationError extends RouterEvent {
|
|
|
162
219
|
return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;
|
|
163
220
|
}
|
|
164
221
|
}
|
|
222
|
+
if (false) {
|
|
223
|
+
/**
|
|
224
|
+
* \@docsNotRequired
|
|
225
|
+
* @type {?}
|
|
226
|
+
*/
|
|
227
|
+
NavigationError.prototype.error;
|
|
228
|
+
}
|
|
165
229
|
/**
|
|
166
230
|
* An event triggered when routes are recognized.
|
|
167
231
|
*
|
|
@@ -191,6 +255,18 @@ class RoutesRecognized extends RouterEvent {
|
|
|
191
255
|
return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;
|
|
192
256
|
}
|
|
193
257
|
}
|
|
258
|
+
if (false) {
|
|
259
|
+
/**
|
|
260
|
+
* \@docsNotRequired
|
|
261
|
+
* @type {?}
|
|
262
|
+
*/
|
|
263
|
+
RoutesRecognized.prototype.urlAfterRedirects;
|
|
264
|
+
/**
|
|
265
|
+
* \@docsNotRequired
|
|
266
|
+
* @type {?}
|
|
267
|
+
*/
|
|
268
|
+
RoutesRecognized.prototype.state;
|
|
269
|
+
}
|
|
194
270
|
/**
|
|
195
271
|
* An event triggered at the start of the Guard phase of routing.
|
|
196
272
|
*
|
|
@@ -219,6 +295,18 @@ class GuardsCheckStart extends RouterEvent {
|
|
|
219
295
|
return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;
|
|
220
296
|
}
|
|
221
297
|
}
|
|
298
|
+
if (false) {
|
|
299
|
+
/**
|
|
300
|
+
* \@docsNotRequired
|
|
301
|
+
* @type {?}
|
|
302
|
+
*/
|
|
303
|
+
GuardsCheckStart.prototype.urlAfterRedirects;
|
|
304
|
+
/**
|
|
305
|
+
* \@docsNotRequired
|
|
306
|
+
* @type {?}
|
|
307
|
+
*/
|
|
308
|
+
GuardsCheckStart.prototype.state;
|
|
309
|
+
}
|
|
222
310
|
/**
|
|
223
311
|
* An event triggered at the end of the Guard phase of routing.
|
|
224
312
|
*
|
|
@@ -249,6 +337,23 @@ class GuardsCheckEnd extends RouterEvent {
|
|
|
249
337
|
return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;
|
|
250
338
|
}
|
|
251
339
|
}
|
|
340
|
+
if (false) {
|
|
341
|
+
/**
|
|
342
|
+
* \@docsNotRequired
|
|
343
|
+
* @type {?}
|
|
344
|
+
*/
|
|
345
|
+
GuardsCheckEnd.prototype.urlAfterRedirects;
|
|
346
|
+
/**
|
|
347
|
+
* \@docsNotRequired
|
|
348
|
+
* @type {?}
|
|
349
|
+
*/
|
|
350
|
+
GuardsCheckEnd.prototype.state;
|
|
351
|
+
/**
|
|
352
|
+
* \@docsNotRequired
|
|
353
|
+
* @type {?}
|
|
354
|
+
*/
|
|
355
|
+
GuardsCheckEnd.prototype.shouldActivate;
|
|
356
|
+
}
|
|
252
357
|
/**
|
|
253
358
|
* An event triggered at the the start of the Resolve phase of routing.
|
|
254
359
|
*
|
|
@@ -280,6 +385,18 @@ class ResolveStart extends RouterEvent {
|
|
|
280
385
|
return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;
|
|
281
386
|
}
|
|
282
387
|
}
|
|
388
|
+
if (false) {
|
|
389
|
+
/**
|
|
390
|
+
* \@docsNotRequired
|
|
391
|
+
* @type {?}
|
|
392
|
+
*/
|
|
393
|
+
ResolveStart.prototype.urlAfterRedirects;
|
|
394
|
+
/**
|
|
395
|
+
* \@docsNotRequired
|
|
396
|
+
* @type {?}
|
|
397
|
+
*/
|
|
398
|
+
ResolveStart.prototype.state;
|
|
399
|
+
}
|
|
283
400
|
/**
|
|
284
401
|
* An event triggered at the end of the Resolve phase of routing.
|
|
285
402
|
* @see `ResolveStart`.
|
|
@@ -309,6 +426,18 @@ class ResolveEnd extends RouterEvent {
|
|
|
309
426
|
return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;
|
|
310
427
|
}
|
|
311
428
|
}
|
|
429
|
+
if (false) {
|
|
430
|
+
/**
|
|
431
|
+
* \@docsNotRequired
|
|
432
|
+
* @type {?}
|
|
433
|
+
*/
|
|
434
|
+
ResolveEnd.prototype.urlAfterRedirects;
|
|
435
|
+
/**
|
|
436
|
+
* \@docsNotRequired
|
|
437
|
+
* @type {?}
|
|
438
|
+
*/
|
|
439
|
+
ResolveEnd.prototype.state;
|
|
440
|
+
}
|
|
312
441
|
/**
|
|
313
442
|
* An event triggered before lazy loading a route configuration.
|
|
314
443
|
*
|
|
@@ -326,6 +455,13 @@ class RouteConfigLoadStart {
|
|
|
326
455
|
*/
|
|
327
456
|
toString() { return `RouteConfigLoadStart(path: ${this.route.path})`; }
|
|
328
457
|
}
|
|
458
|
+
if (false) {
|
|
459
|
+
/**
|
|
460
|
+
* \@docsNotRequired
|
|
461
|
+
* @type {?}
|
|
462
|
+
*/
|
|
463
|
+
RouteConfigLoadStart.prototype.route;
|
|
464
|
+
}
|
|
329
465
|
/**
|
|
330
466
|
* An event triggered when a route has been lazy loaded.
|
|
331
467
|
*
|
|
@@ -343,6 +479,13 @@ class RouteConfigLoadEnd {
|
|
|
343
479
|
*/
|
|
344
480
|
toString() { return `RouteConfigLoadEnd(path: ${this.route.path})`; }
|
|
345
481
|
}
|
|
482
|
+
if (false) {
|
|
483
|
+
/**
|
|
484
|
+
* \@docsNotRequired
|
|
485
|
+
* @type {?}
|
|
486
|
+
*/
|
|
487
|
+
RouteConfigLoadEnd.prototype.route;
|
|
488
|
+
}
|
|
346
489
|
/**
|
|
347
490
|
* An event triggered at the start of the child-activation
|
|
348
491
|
* part of the Resolve phase of routing.
|
|
@@ -367,6 +510,13 @@ class ChildActivationStart {
|
|
|
367
510
|
return `ChildActivationStart(path: '${path}')`;
|
|
368
511
|
}
|
|
369
512
|
}
|
|
513
|
+
if (false) {
|
|
514
|
+
/**
|
|
515
|
+
* \@docsNotRequired
|
|
516
|
+
* @type {?}
|
|
517
|
+
*/
|
|
518
|
+
ChildActivationStart.prototype.snapshot;
|
|
519
|
+
}
|
|
370
520
|
/**
|
|
371
521
|
* An event triggered at the end of the child-activation part
|
|
372
522
|
* of the Resolve phase of routing.
|
|
@@ -390,6 +540,13 @@ class ChildActivationEnd {
|
|
|
390
540
|
return `ChildActivationEnd(path: '${path}')`;
|
|
391
541
|
}
|
|
392
542
|
}
|
|
543
|
+
if (false) {
|
|
544
|
+
/**
|
|
545
|
+
* \@docsNotRequired
|
|
546
|
+
* @type {?}
|
|
547
|
+
*/
|
|
548
|
+
ChildActivationEnd.prototype.snapshot;
|
|
549
|
+
}
|
|
393
550
|
/**
|
|
394
551
|
* An event triggered at the start of the activation part
|
|
395
552
|
* of the Resolve phase of routing.
|
|
@@ -414,6 +571,13 @@ class ActivationStart {
|
|
|
414
571
|
return `ActivationStart(path: '${path}')`;
|
|
415
572
|
}
|
|
416
573
|
}
|
|
574
|
+
if (false) {
|
|
575
|
+
/**
|
|
576
|
+
* \@docsNotRequired
|
|
577
|
+
* @type {?}
|
|
578
|
+
*/
|
|
579
|
+
ActivationStart.prototype.snapshot;
|
|
580
|
+
}
|
|
417
581
|
/**
|
|
418
582
|
* An event triggered at the end of the activation part
|
|
419
583
|
* of the Resolve phase of routing.
|
|
@@ -438,6 +602,13 @@ class ActivationEnd {
|
|
|
438
602
|
return `ActivationEnd(path: '${path}')`;
|
|
439
603
|
}
|
|
440
604
|
}
|
|
605
|
+
if (false) {
|
|
606
|
+
/**
|
|
607
|
+
* \@docsNotRequired
|
|
608
|
+
* @type {?}
|
|
609
|
+
*/
|
|
610
|
+
ActivationEnd.prototype.snapshot;
|
|
611
|
+
}
|
|
441
612
|
/**
|
|
442
613
|
* An event triggered by scrolling.
|
|
443
614
|
*
|
|
@@ -463,6 +634,23 @@ class Scroll {
|
|
|
463
634
|
return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;
|
|
464
635
|
}
|
|
465
636
|
}
|
|
637
|
+
if (false) {
|
|
638
|
+
/**
|
|
639
|
+
* \@docsNotRequired
|
|
640
|
+
* @type {?}
|
|
641
|
+
*/
|
|
642
|
+
Scroll.prototype.routerEvent;
|
|
643
|
+
/**
|
|
644
|
+
* \@docsNotRequired
|
|
645
|
+
* @type {?}
|
|
646
|
+
*/
|
|
647
|
+
Scroll.prototype.position;
|
|
648
|
+
/**
|
|
649
|
+
* \@docsNotRequired
|
|
650
|
+
* @type {?}
|
|
651
|
+
*/
|
|
652
|
+
Scroll.prototype.anchor;
|
|
653
|
+
}
|
|
466
654
|
|
|
467
655
|
/**
|
|
468
656
|
* @fileoverview added by tsickle
|
|
@@ -501,6 +689,47 @@ class ɵEmptyOutletComponent {
|
|
|
501
689
|
* @type {?}
|
|
502
690
|
*/
|
|
503
691
|
const PRIMARY_OUTLET = 'primary';
|
|
692
|
+
/**
|
|
693
|
+
* A map that provides access to the required and optional parameters
|
|
694
|
+
* specific to a route.
|
|
695
|
+
* The map supports retrieving a single value with `get()`
|
|
696
|
+
* or multiple values with `getAll()`.
|
|
697
|
+
*
|
|
698
|
+
* @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
|
|
699
|
+
*
|
|
700
|
+
* \@publicApi
|
|
701
|
+
* @record
|
|
702
|
+
*/
|
|
703
|
+
function ParamMap() { }
|
|
704
|
+
if (false) {
|
|
705
|
+
/**
|
|
706
|
+
* Names of the parameters in the map.
|
|
707
|
+
* @type {?}
|
|
708
|
+
*/
|
|
709
|
+
ParamMap.prototype.keys;
|
|
710
|
+
/**
|
|
711
|
+
* Reports whether the map contains a given parameter.
|
|
712
|
+
* @param {?} name The parameter name.
|
|
713
|
+
* @return {?} True if the map contains the given parameter, false otherwise.
|
|
714
|
+
*/
|
|
715
|
+
ParamMap.prototype.has = function (name) { };
|
|
716
|
+
/**
|
|
717
|
+
* Retrieves a single value for a parameter.
|
|
718
|
+
* @param {?} name The parameter name.
|
|
719
|
+
* @return {?} The parameter's single value,
|
|
720
|
+
* or the first value if the parameter has multiple values,
|
|
721
|
+
* or `null` when there is no such parameter.
|
|
722
|
+
*/
|
|
723
|
+
ParamMap.prototype.get = function (name) { };
|
|
724
|
+
/**
|
|
725
|
+
* Retrieves multiple values for a parameter.
|
|
726
|
+
* @param {?} name The parameter name.
|
|
727
|
+
* @return {?} An array containing one or more values,
|
|
728
|
+
* or an empty array if there is no such parameter.
|
|
729
|
+
*
|
|
730
|
+
*/
|
|
731
|
+
ParamMap.prototype.getAll = function (name) { };
|
|
732
|
+
}
|
|
504
733
|
class ParamsAsMap {
|
|
505
734
|
/**
|
|
506
735
|
* @param {?} params
|
|
@@ -540,6 +769,13 @@ class ParamsAsMap {
|
|
|
540
769
|
*/
|
|
541
770
|
get keys() { return Object.keys(this.params); }
|
|
542
771
|
}
|
|
772
|
+
if (false) {
|
|
773
|
+
/**
|
|
774
|
+
* @type {?}
|
|
775
|
+
* @private
|
|
776
|
+
*/
|
|
777
|
+
ParamsAsMap.prototype.params;
|
|
778
|
+
}
|
|
543
779
|
/**
|
|
544
780
|
* Converts a `Params` instance to a `ParamMap`.
|
|
545
781
|
* \@publicApi
|
|
@@ -613,6 +849,351 @@ function defaultUrlMatcher(segments, segmentGroup, route) {
|
|
|
613
849
|
* @fileoverview added by tsickle
|
|
614
850
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
615
851
|
*/
|
|
852
|
+
/**
|
|
853
|
+
* A configuration object that defines a single route.
|
|
854
|
+
* A set of routes are collected in a `Routes` array to define a `Router` configuration.
|
|
855
|
+
* The router attempts to match segments of a given URL against each route,
|
|
856
|
+
* using the configuration options defined in this object.
|
|
857
|
+
*
|
|
858
|
+
* Supports static, parameterized, redirect, and wildcard routes, as well as
|
|
859
|
+
* custom route data and resolve methods.
|
|
860
|
+
*
|
|
861
|
+
* For detailed usage information, see the [Routing Guide](guide/router).
|
|
862
|
+
*
|
|
863
|
+
* \@usageNotes
|
|
864
|
+
*
|
|
865
|
+
* ### Simple Configuration
|
|
866
|
+
*
|
|
867
|
+
* The following route specifies that when navigating to, for example,
|
|
868
|
+
* `/team/11/user/bob`, the router creates the 'Team' component
|
|
869
|
+
* with the 'User' child component in it.
|
|
870
|
+
*
|
|
871
|
+
* ```
|
|
872
|
+
* [{
|
|
873
|
+
* path: 'team/:id',
|
|
874
|
+
* component: Team,
|
|
875
|
+
* children: [{
|
|
876
|
+
* path: 'user/:name',
|
|
877
|
+
* component: User
|
|
878
|
+
* }]
|
|
879
|
+
* }]
|
|
880
|
+
* ```
|
|
881
|
+
*
|
|
882
|
+
* ### Multiple Outlets
|
|
883
|
+
*
|
|
884
|
+
* The following route creates sibling components with multiple outlets.
|
|
885
|
+
* When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to
|
|
886
|
+
* the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.
|
|
887
|
+
*
|
|
888
|
+
* ```
|
|
889
|
+
* [{
|
|
890
|
+
* path: 'team/:id',
|
|
891
|
+
* component: Team
|
|
892
|
+
* }, {
|
|
893
|
+
* path: 'chat/:user',
|
|
894
|
+
* component: Chat
|
|
895
|
+
* outlet: 'aux'
|
|
896
|
+
* }]
|
|
897
|
+
* ```
|
|
898
|
+
*
|
|
899
|
+
* ### Wild Cards
|
|
900
|
+
*
|
|
901
|
+
* The following route uses wild-card notation to specify a component
|
|
902
|
+
* that is always instantiated regardless of where you navigate to.
|
|
903
|
+
*
|
|
904
|
+
* ```
|
|
905
|
+
* [{
|
|
906
|
+
* path: '**',
|
|
907
|
+
* component: WildcardComponent
|
|
908
|
+
* }]
|
|
909
|
+
* ```
|
|
910
|
+
*
|
|
911
|
+
* ### Redirects
|
|
912
|
+
*
|
|
913
|
+
* The following route uses the `redirectTo` property to ignore a segment of
|
|
914
|
+
* a given URL when looking for a child path.
|
|
915
|
+
*
|
|
916
|
+
* When navigating to '/team/11/legacy/user/jim', the router changes the URL segment
|
|
917
|
+
* '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates
|
|
918
|
+
* the Team component with the User child component in it.
|
|
919
|
+
*
|
|
920
|
+
* ```
|
|
921
|
+
* [{
|
|
922
|
+
* path: 'team/:id',
|
|
923
|
+
* component: Team,
|
|
924
|
+
* children: [{
|
|
925
|
+
* path: 'legacy/user/:name',
|
|
926
|
+
* redirectTo: 'user/:name'
|
|
927
|
+
* }, {
|
|
928
|
+
* path: 'user/:name',
|
|
929
|
+
* component: User
|
|
930
|
+
* }]
|
|
931
|
+
* }]
|
|
932
|
+
* ```
|
|
933
|
+
*
|
|
934
|
+
* The redirect path can be relative, as shown in this example, or absolute.
|
|
935
|
+
* If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',
|
|
936
|
+
* the result URL is also absolute, '/user/jim'.
|
|
937
|
+
* ### Empty Path
|
|
938
|
+
*
|
|
939
|
+
* Empty-path route configurations can be used to instantiate components that do not 'consume'
|
|
940
|
+
* any URL segments.
|
|
941
|
+
*
|
|
942
|
+
* In the following configuration, when navigating to
|
|
943
|
+
* `/team/11`, the router instantiates the 'AllUsers' component.
|
|
944
|
+
*
|
|
945
|
+
* ```
|
|
946
|
+
* [{
|
|
947
|
+
* path: 'team/:id',
|
|
948
|
+
* component: Team,
|
|
949
|
+
* children: [{
|
|
950
|
+
* path: '',
|
|
951
|
+
* component: AllUsers
|
|
952
|
+
* }, {
|
|
953
|
+
* path: 'user/:name',
|
|
954
|
+
* component: User
|
|
955
|
+
* }]
|
|
956
|
+
* }]
|
|
957
|
+
* ```
|
|
958
|
+
*
|
|
959
|
+
* Empty-path routes can have children. In the following example, when navigating
|
|
960
|
+
* to `/team/11/user/jim`, the router instantiates the wrapper component with
|
|
961
|
+
* the user component in it.
|
|
962
|
+
*
|
|
963
|
+
* Note that an empty path route inherits its parent's parameters and data.
|
|
964
|
+
*
|
|
965
|
+
* ```
|
|
966
|
+
* [{
|
|
967
|
+
* path: 'team/:id',
|
|
968
|
+
* component: Team,
|
|
969
|
+
* children: [{
|
|
970
|
+
* path: '',
|
|
971
|
+
* component: WrapperCmp,
|
|
972
|
+
* children: [{
|
|
973
|
+
* path: 'user/:name',
|
|
974
|
+
* component: User
|
|
975
|
+
* }]
|
|
976
|
+
* }]
|
|
977
|
+
* }]
|
|
978
|
+
* ```
|
|
979
|
+
*
|
|
980
|
+
* ### Matching Strategy
|
|
981
|
+
*
|
|
982
|
+
* The default path-match strategy is 'prefix', which means that the router
|
|
983
|
+
* checks URL elements from the left to see if the URL matches a specified path.
|
|
984
|
+
* For example, '/team/11/user' matches 'team/:id'.
|
|
985
|
+
*
|
|
986
|
+
* ```
|
|
987
|
+
* [{
|
|
988
|
+
* path: '',
|
|
989
|
+
* pathMatch: 'prefix', //default
|
|
990
|
+
* redirectTo: 'main'
|
|
991
|
+
* }, {
|
|
992
|
+
* path: 'main',
|
|
993
|
+
* component: Main
|
|
994
|
+
* }]
|
|
995
|
+
* ```
|
|
996
|
+
*
|
|
997
|
+
* You can specify the path-match strategy 'full' to make sure that the path
|
|
998
|
+
* covers the whole unconsumed URL. It is important to do this when redirecting
|
|
999
|
+
* empty-path routes. Otherwise, because an empty path is a prefix of any URL,
|
|
1000
|
+
* the router would apply the redirect even when navigating to the redirect destination,
|
|
1001
|
+
* creating an endless loop.
|
|
1002
|
+
*
|
|
1003
|
+
* In the following example, supplying the 'full' `patchMatch` strategy ensures
|
|
1004
|
+
* that the router applies the redirect if and only if navigating to '/'.
|
|
1005
|
+
*
|
|
1006
|
+
* ```
|
|
1007
|
+
* [{
|
|
1008
|
+
* path: '',
|
|
1009
|
+
* pathMatch: 'full',
|
|
1010
|
+
* redirectTo: 'main'
|
|
1011
|
+
* }, {
|
|
1012
|
+
* path: 'main',
|
|
1013
|
+
* component: Main
|
|
1014
|
+
* }]
|
|
1015
|
+
* ```
|
|
1016
|
+
*
|
|
1017
|
+
* ### Componentless Routes
|
|
1018
|
+
*
|
|
1019
|
+
* You can share parameters between sibling components.
|
|
1020
|
+
* For example, suppose that two sibling components should go next to each other,
|
|
1021
|
+
* and both of them require an ID parameter. You can accomplish this using a route
|
|
1022
|
+
* that does not specify a component at the top level.
|
|
1023
|
+
*
|
|
1024
|
+
* In the following example, 'MainChild' and 'AuxChild' are siblings.
|
|
1025
|
+
* When navigating to 'parent/10/(a//aux:b)', the route instantiates
|
|
1026
|
+
* the main child and aux child components next to each other.
|
|
1027
|
+
* For this to work, the application component must have the primary and aux outlets defined.
|
|
1028
|
+
*
|
|
1029
|
+
* ```
|
|
1030
|
+
* [{
|
|
1031
|
+
* path: 'parent/:id',
|
|
1032
|
+
* children: [
|
|
1033
|
+
* { path: 'a', component: MainChild },
|
|
1034
|
+
* { path: 'b', component: AuxChild, outlet: 'aux' }
|
|
1035
|
+
* ]
|
|
1036
|
+
* }]
|
|
1037
|
+
* ```
|
|
1038
|
+
*
|
|
1039
|
+
* The router merges the parameters, data, and resolve of the componentless
|
|
1040
|
+
* parent into the parameters, data, and resolve of the children.
|
|
1041
|
+
*
|
|
1042
|
+
* This is especially useful when child components are defined
|
|
1043
|
+
* with an empty path string, as in the following example.
|
|
1044
|
+
* With this configuration, navigating to '/parent/10' creates
|
|
1045
|
+
* the main child and aux components.
|
|
1046
|
+
*
|
|
1047
|
+
* ```
|
|
1048
|
+
* [{
|
|
1049
|
+
* path: 'parent/:id',
|
|
1050
|
+
* children: [
|
|
1051
|
+
* { path: '', component: MainChild },
|
|
1052
|
+
* { path: '', component: AuxChild, outlet: 'aux' }
|
|
1053
|
+
* ]
|
|
1054
|
+
* }]
|
|
1055
|
+
* ```
|
|
1056
|
+
*
|
|
1057
|
+
* ### Lazy Loading
|
|
1058
|
+
*
|
|
1059
|
+
* Lazy loading speeds up application load time by splitting the application
|
|
1060
|
+
* into multiple bundles and loading them on demand.
|
|
1061
|
+
* To use lazy loading, provide the `loadChildren` property instead of the `children` property.
|
|
1062
|
+
*
|
|
1063
|
+
* Given the following example route, the router uses the registered
|
|
1064
|
+
* `NgModuleFactoryLoader` to fetch an NgModule associated with 'team'.
|
|
1065
|
+
* It then extracts the set of routes defined in that NgModule,
|
|
1066
|
+
* and transparently adds those routes to the main configuration.
|
|
1067
|
+
*
|
|
1068
|
+
* ```
|
|
1069
|
+
* [{
|
|
1070
|
+
* path: 'team/:id',
|
|
1071
|
+
* component: Team,
|
|
1072
|
+
* loadChildren: 'team'
|
|
1073
|
+
* }]
|
|
1074
|
+
* ```
|
|
1075
|
+
*
|
|
1076
|
+
* \@publicApi
|
|
1077
|
+
* @record
|
|
1078
|
+
*/
|
|
1079
|
+
function Route() { }
|
|
1080
|
+
if (false) {
|
|
1081
|
+
/**
|
|
1082
|
+
* The path to match against, a URL string that uses router matching notation.
|
|
1083
|
+
* Can be a wild card (`**`) that matches any URL (see Usage Notes below).
|
|
1084
|
+
* Default is "/" (the root path).
|
|
1085
|
+
* @type {?|undefined}
|
|
1086
|
+
*/
|
|
1087
|
+
Route.prototype.path;
|
|
1088
|
+
/**
|
|
1089
|
+
* The path-matching strategy, one of 'prefix' or 'full'.
|
|
1090
|
+
* Default is 'prefix'.
|
|
1091
|
+
*
|
|
1092
|
+
* By default, the router checks URL elements from the left to see if the URL
|
|
1093
|
+
* matches a given path, and stops when there is a match. For example,
|
|
1094
|
+
* '/team/11/user' matches 'team/:id'.
|
|
1095
|
+
*
|
|
1096
|
+
* The path-match strategy 'full' matches against the entire URL.
|
|
1097
|
+
* It is important to do this when redirecting empty-path routes.
|
|
1098
|
+
* Otherwise, because an empty path is a prefix of any URL,
|
|
1099
|
+
* the router would apply the redirect even when navigating
|
|
1100
|
+
* to the redirect destination, creating an endless loop.
|
|
1101
|
+
*
|
|
1102
|
+
* @type {?|undefined}
|
|
1103
|
+
*/
|
|
1104
|
+
Route.prototype.pathMatch;
|
|
1105
|
+
/**
|
|
1106
|
+
* A URL-matching function to use as a custom strategy for path matching.
|
|
1107
|
+
* If present, supersedes `path` and `pathMatch`.
|
|
1108
|
+
* @type {?|undefined}
|
|
1109
|
+
*/
|
|
1110
|
+
Route.prototype.matcher;
|
|
1111
|
+
/**
|
|
1112
|
+
* The component to instantiate when the path matches.
|
|
1113
|
+
* Can be empty if child routes specify components.
|
|
1114
|
+
* @type {?|undefined}
|
|
1115
|
+
*/
|
|
1116
|
+
Route.prototype.component;
|
|
1117
|
+
/**
|
|
1118
|
+
* A URL to which to redirect when a the path matches.
|
|
1119
|
+
* Absolute if the URL begins with a slash (/), otherwise relative to the path URL.
|
|
1120
|
+
* When not present, router does not redirect.
|
|
1121
|
+
* @type {?|undefined}
|
|
1122
|
+
*/
|
|
1123
|
+
Route.prototype.redirectTo;
|
|
1124
|
+
/**
|
|
1125
|
+
* Name of a `RouterOutlet` object where the component can be placed
|
|
1126
|
+
* when the path matches.
|
|
1127
|
+
* @type {?|undefined}
|
|
1128
|
+
*/
|
|
1129
|
+
Route.prototype.outlet;
|
|
1130
|
+
/**
|
|
1131
|
+
* An array of dependency-injection tokens used to look up `CanActivate()`
|
|
1132
|
+
* handlers, in order to determine if the current user is allowed to
|
|
1133
|
+
* activate the component. By default, any user can activate.
|
|
1134
|
+
* @type {?|undefined}
|
|
1135
|
+
*/
|
|
1136
|
+
Route.prototype.canActivate;
|
|
1137
|
+
/**
|
|
1138
|
+
* An array of DI tokens used to look up `CanActivateChild()` handlers,
|
|
1139
|
+
* in order to determine if the current user is allowed to activate
|
|
1140
|
+
* a child of the component. By default, any user can activate a child.
|
|
1141
|
+
* @type {?|undefined}
|
|
1142
|
+
*/
|
|
1143
|
+
Route.prototype.canActivateChild;
|
|
1144
|
+
/**
|
|
1145
|
+
* An array of DI tokens used to look up `CanDeactivate()`
|
|
1146
|
+
* handlers, in order to determine if the current user is allowed to
|
|
1147
|
+
* deactivate the component. By default, any user can deactivate.
|
|
1148
|
+
*
|
|
1149
|
+
* @type {?|undefined}
|
|
1150
|
+
*/
|
|
1151
|
+
Route.prototype.canDeactivate;
|
|
1152
|
+
/**
|
|
1153
|
+
* An array of DI tokens used to look up `CanLoad()`
|
|
1154
|
+
* handlers, in order to determine if the current user is allowed to
|
|
1155
|
+
* load the component. By default, any user can load.
|
|
1156
|
+
* @type {?|undefined}
|
|
1157
|
+
*/
|
|
1158
|
+
Route.prototype.canLoad;
|
|
1159
|
+
/**
|
|
1160
|
+
* Additional developer-defined data provided to the component via
|
|
1161
|
+
* `ActivatedRoute`. By default, no additional data is passed.
|
|
1162
|
+
* @type {?|undefined}
|
|
1163
|
+
*/
|
|
1164
|
+
Route.prototype.data;
|
|
1165
|
+
/**
|
|
1166
|
+
* A map of DI tokens used to look up data resolvers. See `Resolve`.
|
|
1167
|
+
* @type {?|undefined}
|
|
1168
|
+
*/
|
|
1169
|
+
Route.prototype.resolve;
|
|
1170
|
+
/**
|
|
1171
|
+
* An array of child `Route` objects that specifies a nested route
|
|
1172
|
+
* configuration.
|
|
1173
|
+
* @type {?|undefined}
|
|
1174
|
+
*/
|
|
1175
|
+
Route.prototype.children;
|
|
1176
|
+
/**
|
|
1177
|
+
* A `LoadChildren` object specifying lazy-loaded child routes.
|
|
1178
|
+
* @type {?|undefined}
|
|
1179
|
+
*/
|
|
1180
|
+
Route.prototype.loadChildren;
|
|
1181
|
+
/**
|
|
1182
|
+
* Defines when guards and resolvers will be run. One of
|
|
1183
|
+
* - `paramsOrQueryParamsChange` : Run when query parameters change.
|
|
1184
|
+
* - `always` : Run on every execution.
|
|
1185
|
+
* By default, guards and resolvers run only when the matrix
|
|
1186
|
+
* parameters of the route change.
|
|
1187
|
+
* @type {?|undefined}
|
|
1188
|
+
*/
|
|
1189
|
+
Route.prototype.runGuardsAndResolvers;
|
|
1190
|
+
/**
|
|
1191
|
+
* Filled for routes with `loadChildren` once the module has been loaded
|
|
1192
|
+
* \@internal
|
|
1193
|
+
* @type {?|undefined}
|
|
1194
|
+
*/
|
|
1195
|
+
Route.prototype._loadedConfig;
|
|
1196
|
+
}
|
|
616
1197
|
class LoadedRouterConfig {
|
|
617
1198
|
/**
|
|
618
1199
|
* @param {?} routes
|
|
@@ -623,6 +1204,12 @@ class LoadedRouterConfig {
|
|
|
623
1204
|
this.module = module;
|
|
624
1205
|
}
|
|
625
1206
|
}
|
|
1207
|
+
if (false) {
|
|
1208
|
+
/** @type {?} */
|
|
1209
|
+
LoadedRouterConfig.prototype.routes;
|
|
1210
|
+
/** @type {?} */
|
|
1211
|
+
LoadedRouterConfig.prototype.module;
|
|
1212
|
+
}
|
|
626
1213
|
/**
|
|
627
1214
|
* @param {?} config
|
|
628
1215
|
* @param {?=} parentPath
|
|
@@ -801,6 +1388,18 @@ function flatten(arr) {
|
|
|
801
1388
|
function last(a) {
|
|
802
1389
|
return a.length > 0 ? a[a.length - 1] : null;
|
|
803
1390
|
}
|
|
1391
|
+
/**
|
|
1392
|
+
* Verifys all booleans in an array are `true`.
|
|
1393
|
+
* @param {?} bools
|
|
1394
|
+
* @return {?}
|
|
1395
|
+
*/
|
|
1396
|
+
function and(bools) {
|
|
1397
|
+
return !bools.some((/**
|
|
1398
|
+
* @param {?} v
|
|
1399
|
+
* @return {?}
|
|
1400
|
+
*/
|
|
1401
|
+
v => !v));
|
|
1402
|
+
}
|
|
804
1403
|
/**
|
|
805
1404
|
* @template K, V
|
|
806
1405
|
* @param {?} map
|
|
@@ -1045,6 +1644,28 @@ class UrlTree {
|
|
|
1045
1644
|
*/
|
|
1046
1645
|
toString() { return DEFAULT_SERIALIZER.serialize(this); }
|
|
1047
1646
|
}
|
|
1647
|
+
if (false) {
|
|
1648
|
+
/**
|
|
1649
|
+
* \@internal
|
|
1650
|
+
* @type {?}
|
|
1651
|
+
*/
|
|
1652
|
+
UrlTree.prototype._queryParamMap;
|
|
1653
|
+
/**
|
|
1654
|
+
* The root segment group of the URL tree
|
|
1655
|
+
* @type {?}
|
|
1656
|
+
*/
|
|
1657
|
+
UrlTree.prototype.root;
|
|
1658
|
+
/**
|
|
1659
|
+
* The query params of the URL
|
|
1660
|
+
* @type {?}
|
|
1661
|
+
*/
|
|
1662
|
+
UrlTree.prototype.queryParams;
|
|
1663
|
+
/**
|
|
1664
|
+
* The fragment of the URL
|
|
1665
|
+
* @type {?}
|
|
1666
|
+
*/
|
|
1667
|
+
UrlTree.prototype.fragment;
|
|
1668
|
+
}
|
|
1048
1669
|
/**
|
|
1049
1670
|
* \@description
|
|
1050
1671
|
*
|
|
@@ -1091,6 +1712,33 @@ class UrlSegmentGroup {
|
|
|
1091
1712
|
*/
|
|
1092
1713
|
toString() { return serializePaths(this); }
|
|
1093
1714
|
}
|
|
1715
|
+
if (false) {
|
|
1716
|
+
/**
|
|
1717
|
+
* \@internal
|
|
1718
|
+
* @type {?}
|
|
1719
|
+
*/
|
|
1720
|
+
UrlSegmentGroup.prototype._sourceSegment;
|
|
1721
|
+
/**
|
|
1722
|
+
* \@internal
|
|
1723
|
+
* @type {?}
|
|
1724
|
+
*/
|
|
1725
|
+
UrlSegmentGroup.prototype._segmentIndexShift;
|
|
1726
|
+
/**
|
|
1727
|
+
* The parent node in the url tree
|
|
1728
|
+
* @type {?}
|
|
1729
|
+
*/
|
|
1730
|
+
UrlSegmentGroup.prototype.parent;
|
|
1731
|
+
/**
|
|
1732
|
+
* The URL segments of this group. See `UrlSegment` for more information
|
|
1733
|
+
* @type {?}
|
|
1734
|
+
*/
|
|
1735
|
+
UrlSegmentGroup.prototype.segments;
|
|
1736
|
+
/**
|
|
1737
|
+
* The list of children of this group
|
|
1738
|
+
* @type {?}
|
|
1739
|
+
*/
|
|
1740
|
+
UrlSegmentGroup.prototype.children;
|
|
1741
|
+
}
|
|
1094
1742
|
/**
|
|
1095
1743
|
* \@description
|
|
1096
1744
|
*
|
|
@@ -1141,6 +1789,23 @@ class UrlSegment {
|
|
|
1141
1789
|
*/
|
|
1142
1790
|
toString() { return serializePath(this); }
|
|
1143
1791
|
}
|
|
1792
|
+
if (false) {
|
|
1793
|
+
/**
|
|
1794
|
+
* \@internal
|
|
1795
|
+
* @type {?}
|
|
1796
|
+
*/
|
|
1797
|
+
UrlSegment.prototype._parameterMap;
|
|
1798
|
+
/**
|
|
1799
|
+
* The path part of a URL segment
|
|
1800
|
+
* @type {?}
|
|
1801
|
+
*/
|
|
1802
|
+
UrlSegment.prototype.path;
|
|
1803
|
+
/**
|
|
1804
|
+
* The matrix parameters associated with a segment
|
|
1805
|
+
* @type {?}
|
|
1806
|
+
*/
|
|
1807
|
+
UrlSegment.prototype.parameters;
|
|
1808
|
+
}
|
|
1144
1809
|
/**
|
|
1145
1810
|
* @param {?} as
|
|
1146
1811
|
* @param {?} bs
|
|
@@ -1215,6 +1880,22 @@ function mapChildrenIntoArray(segment, fn) {
|
|
|
1215
1880
|
*/
|
|
1216
1881
|
class UrlSerializer {
|
|
1217
1882
|
}
|
|
1883
|
+
if (false) {
|
|
1884
|
+
/**
|
|
1885
|
+
* Parse a url into a `UrlTree`
|
|
1886
|
+
* @abstract
|
|
1887
|
+
* @param {?} url
|
|
1888
|
+
* @return {?}
|
|
1889
|
+
*/
|
|
1890
|
+
UrlSerializer.prototype.parse = function (url) { };
|
|
1891
|
+
/**
|
|
1892
|
+
* Converts a `UrlTree` into a url
|
|
1893
|
+
* @abstract
|
|
1894
|
+
* @param {?} tree
|
|
1895
|
+
* @return {?}
|
|
1896
|
+
*/
|
|
1897
|
+
UrlSerializer.prototype.serialize = function (tree) { };
|
|
1898
|
+
}
|
|
1218
1899
|
/**
|
|
1219
1900
|
* \@description
|
|
1220
1901
|
*
|
|
@@ -1692,6 +2373,18 @@ class UrlParser {
|
|
|
1692
2373
|
}
|
|
1693
2374
|
}
|
|
1694
2375
|
}
|
|
2376
|
+
if (false) {
|
|
2377
|
+
/**
|
|
2378
|
+
* @type {?}
|
|
2379
|
+
* @private
|
|
2380
|
+
*/
|
|
2381
|
+
UrlParser.prototype.remaining;
|
|
2382
|
+
/**
|
|
2383
|
+
* @type {?}
|
|
2384
|
+
* @private
|
|
2385
|
+
*/
|
|
2386
|
+
UrlParser.prototype.url;
|
|
2387
|
+
}
|
|
1695
2388
|
|
|
1696
2389
|
/**
|
|
1697
2390
|
* @fileoverview added by tsickle
|
|
@@ -1783,6 +2476,13 @@ class Tree {
|
|
|
1783
2476
|
*/
|
|
1784
2477
|
s => s.value)); }
|
|
1785
2478
|
}
|
|
2479
|
+
if (false) {
|
|
2480
|
+
/**
|
|
2481
|
+
* \@internal
|
|
2482
|
+
* @type {?}
|
|
2483
|
+
*/
|
|
2484
|
+
Tree.prototype._root;
|
|
2485
|
+
}
|
|
1786
2486
|
// DFS for the node matching the value
|
|
1787
2487
|
/**
|
|
1788
2488
|
* @template T
|
|
@@ -1838,6 +2538,12 @@ class TreeNode {
|
|
|
1838
2538
|
*/
|
|
1839
2539
|
toString() { return `TreeNode(${this.value})`; }
|
|
1840
2540
|
}
|
|
2541
|
+
if (false) {
|
|
2542
|
+
/** @type {?} */
|
|
2543
|
+
TreeNode.prototype.value;
|
|
2544
|
+
/** @type {?} */
|
|
2545
|
+
TreeNode.prototype.children;
|
|
2546
|
+
}
|
|
1841
2547
|
// Return the list of T indexed by outlet name
|
|
1842
2548
|
/**
|
|
1843
2549
|
* @template T
|
|
@@ -1906,6 +2612,13 @@ class RouterState extends Tree {
|
|
|
1906
2612
|
*/
|
|
1907
2613
|
toString() { return this.snapshot.toString(); }
|
|
1908
2614
|
}
|
|
2615
|
+
if (false) {
|
|
2616
|
+
/**
|
|
2617
|
+
* The current snapshot of the router state
|
|
2618
|
+
* @type {?}
|
|
2619
|
+
*/
|
|
2620
|
+
RouterState.prototype.snapshot;
|
|
2621
|
+
}
|
|
1909
2622
|
/**
|
|
1910
2623
|
* @param {?} urlTree
|
|
1911
2624
|
* @param {?} rootComponent
|
|
@@ -2048,6 +2761,68 @@ class ActivatedRoute {
|
|
|
2048
2761
|
return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;
|
|
2049
2762
|
}
|
|
2050
2763
|
}
|
|
2764
|
+
if (false) {
|
|
2765
|
+
/**
|
|
2766
|
+
* The current snapshot of this route
|
|
2767
|
+
* @type {?}
|
|
2768
|
+
*/
|
|
2769
|
+
ActivatedRoute.prototype.snapshot;
|
|
2770
|
+
/**
|
|
2771
|
+
* \@internal
|
|
2772
|
+
* @type {?}
|
|
2773
|
+
*/
|
|
2774
|
+
ActivatedRoute.prototype._futureSnapshot;
|
|
2775
|
+
/**
|
|
2776
|
+
* \@internal
|
|
2777
|
+
* @type {?}
|
|
2778
|
+
*/
|
|
2779
|
+
ActivatedRoute.prototype._routerState;
|
|
2780
|
+
/**
|
|
2781
|
+
* \@internal
|
|
2782
|
+
* @type {?}
|
|
2783
|
+
*/
|
|
2784
|
+
ActivatedRoute.prototype._paramMap;
|
|
2785
|
+
/**
|
|
2786
|
+
* \@internal
|
|
2787
|
+
* @type {?}
|
|
2788
|
+
*/
|
|
2789
|
+
ActivatedRoute.prototype._queryParamMap;
|
|
2790
|
+
/**
|
|
2791
|
+
* An observable of the URL segments matched by this route.
|
|
2792
|
+
* @type {?}
|
|
2793
|
+
*/
|
|
2794
|
+
ActivatedRoute.prototype.url;
|
|
2795
|
+
/**
|
|
2796
|
+
* An observable of the matrix parameters scoped to this route.
|
|
2797
|
+
* @type {?}
|
|
2798
|
+
*/
|
|
2799
|
+
ActivatedRoute.prototype.params;
|
|
2800
|
+
/**
|
|
2801
|
+
* An observable of the query parameters shared by all the routes.
|
|
2802
|
+
* @type {?}
|
|
2803
|
+
*/
|
|
2804
|
+
ActivatedRoute.prototype.queryParams;
|
|
2805
|
+
/**
|
|
2806
|
+
* An observable of the URL fragment shared by all the routes.
|
|
2807
|
+
* @type {?}
|
|
2808
|
+
*/
|
|
2809
|
+
ActivatedRoute.prototype.fragment;
|
|
2810
|
+
/**
|
|
2811
|
+
* An observable of the static and resolved data of this route.
|
|
2812
|
+
* @type {?}
|
|
2813
|
+
*/
|
|
2814
|
+
ActivatedRoute.prototype.data;
|
|
2815
|
+
/**
|
|
2816
|
+
* The outlet name of the route, a constant.
|
|
2817
|
+
* @type {?}
|
|
2818
|
+
*/
|
|
2819
|
+
ActivatedRoute.prototype.outlet;
|
|
2820
|
+
/**
|
|
2821
|
+
* The component of the route, a constant.
|
|
2822
|
+
* @type {?}
|
|
2823
|
+
*/
|
|
2824
|
+
ActivatedRoute.prototype.component;
|
|
2825
|
+
}
|
|
2051
2826
|
/**
|
|
2052
2827
|
* Returns the inherited params, data, and resolve for a given route.
|
|
2053
2828
|
* By default, this only inherits values up to the nearest path-less or component-less route.
|
|
@@ -2210,6 +2985,83 @@ class ActivatedRouteSnapshot {
|
|
|
2210
2985
|
return `Route(url:'${url}', path:'${matched}')`;
|
|
2211
2986
|
}
|
|
2212
2987
|
}
|
|
2988
|
+
if (false) {
|
|
2989
|
+
/**
|
|
2990
|
+
* The configuration used to match this route *
|
|
2991
|
+
* @type {?}
|
|
2992
|
+
*/
|
|
2993
|
+
ActivatedRouteSnapshot.prototype.routeConfig;
|
|
2994
|
+
/**
|
|
2995
|
+
* \@internal *
|
|
2996
|
+
* @type {?}
|
|
2997
|
+
*/
|
|
2998
|
+
ActivatedRouteSnapshot.prototype._urlSegment;
|
|
2999
|
+
/**
|
|
3000
|
+
* \@internal
|
|
3001
|
+
* @type {?}
|
|
3002
|
+
*/
|
|
3003
|
+
ActivatedRouteSnapshot.prototype._lastPathIndex;
|
|
3004
|
+
/**
|
|
3005
|
+
* \@internal
|
|
3006
|
+
* @type {?}
|
|
3007
|
+
*/
|
|
3008
|
+
ActivatedRouteSnapshot.prototype._resolve;
|
|
3009
|
+
/**
|
|
3010
|
+
* \@internal
|
|
3011
|
+
* @type {?}
|
|
3012
|
+
*/
|
|
3013
|
+
ActivatedRouteSnapshot.prototype._resolvedData;
|
|
3014
|
+
/**
|
|
3015
|
+
* \@internal
|
|
3016
|
+
* @type {?}
|
|
3017
|
+
*/
|
|
3018
|
+
ActivatedRouteSnapshot.prototype._routerState;
|
|
3019
|
+
/**
|
|
3020
|
+
* \@internal
|
|
3021
|
+
* @type {?}
|
|
3022
|
+
*/
|
|
3023
|
+
ActivatedRouteSnapshot.prototype._paramMap;
|
|
3024
|
+
/**
|
|
3025
|
+
* \@internal
|
|
3026
|
+
* @type {?}
|
|
3027
|
+
*/
|
|
3028
|
+
ActivatedRouteSnapshot.prototype._queryParamMap;
|
|
3029
|
+
/**
|
|
3030
|
+
* The URL segments matched by this route
|
|
3031
|
+
* @type {?}
|
|
3032
|
+
*/
|
|
3033
|
+
ActivatedRouteSnapshot.prototype.url;
|
|
3034
|
+
/**
|
|
3035
|
+
* The matrix parameters scoped to this route
|
|
3036
|
+
* @type {?}
|
|
3037
|
+
*/
|
|
3038
|
+
ActivatedRouteSnapshot.prototype.params;
|
|
3039
|
+
/**
|
|
3040
|
+
* The query parameters shared by all the routes
|
|
3041
|
+
* @type {?}
|
|
3042
|
+
*/
|
|
3043
|
+
ActivatedRouteSnapshot.prototype.queryParams;
|
|
3044
|
+
/**
|
|
3045
|
+
* The URL fragment shared by all the routes
|
|
3046
|
+
* @type {?}
|
|
3047
|
+
*/
|
|
3048
|
+
ActivatedRouteSnapshot.prototype.fragment;
|
|
3049
|
+
/**
|
|
3050
|
+
* The static and resolved data of this route
|
|
3051
|
+
* @type {?}
|
|
3052
|
+
*/
|
|
3053
|
+
ActivatedRouteSnapshot.prototype.data;
|
|
3054
|
+
/**
|
|
3055
|
+
* The outlet name of the route
|
|
3056
|
+
* @type {?}
|
|
3057
|
+
*/
|
|
3058
|
+
ActivatedRouteSnapshot.prototype.outlet;
|
|
3059
|
+
/**
|
|
3060
|
+
* The component of the route
|
|
3061
|
+
* @type {?}
|
|
3062
|
+
*/
|
|
3063
|
+
ActivatedRouteSnapshot.prototype.component;
|
|
3064
|
+
}
|
|
2213
3065
|
/**
|
|
2214
3066
|
* \@description
|
|
2215
3067
|
*
|
|
@@ -2253,6 +3105,13 @@ class RouterStateSnapshot extends Tree {
|
|
|
2253
3105
|
*/
|
|
2254
3106
|
toString() { return serializeNode(this._root); }
|
|
2255
3107
|
}
|
|
3108
|
+
if (false) {
|
|
3109
|
+
/**
|
|
3110
|
+
* The url from which this snapshot was created
|
|
3111
|
+
* @type {?}
|
|
3112
|
+
*/
|
|
3113
|
+
RouterStateSnapshot.prototype.url;
|
|
3114
|
+
}
|
|
2256
3115
|
/**
|
|
2257
3116
|
* @template U, T
|
|
2258
3117
|
* @param {?} state
|
|
@@ -2545,6 +3404,14 @@ class Navigation {
|
|
|
2545
3404
|
return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';
|
|
2546
3405
|
}
|
|
2547
3406
|
}
|
|
3407
|
+
if (false) {
|
|
3408
|
+
/** @type {?} */
|
|
3409
|
+
Navigation.prototype.isAbsolute;
|
|
3410
|
+
/** @type {?} */
|
|
3411
|
+
Navigation.prototype.numberOfDoubleDots;
|
|
3412
|
+
/** @type {?} */
|
|
3413
|
+
Navigation.prototype.commands;
|
|
3414
|
+
}
|
|
2548
3415
|
/**
|
|
2549
3416
|
* Transforms commands to a normalized `Navigation`
|
|
2550
3417
|
* @param {?} commands
|
|
@@ -2594,7 +3461,9 @@ function computeNavigation(commands) {
|
|
|
2594
3461
|
* @return {?}
|
|
2595
3462
|
*/
|
|
2596
3463
|
(urlPart, partIndex) => {
|
|
2597
|
-
if (partIndex == 0 && urlPart === '.')
|
|
3464
|
+
if (partIndex == 0 && urlPart === '.') {
|
|
3465
|
+
// skip './a'
|
|
3466
|
+
}
|
|
2598
3467
|
else if (partIndex == 0 && urlPart === '') { // '/a'
|
|
2599
3468
|
isAbsolute = true;
|
|
2600
3469
|
}
|
|
@@ -2623,6 +3492,14 @@ class Position {
|
|
|
2623
3492
|
this.index = index;
|
|
2624
3493
|
}
|
|
2625
3494
|
}
|
|
3495
|
+
if (false) {
|
|
3496
|
+
/** @type {?} */
|
|
3497
|
+
Position.prototype.segmentGroup;
|
|
3498
|
+
/** @type {?} */
|
|
3499
|
+
Position.prototype.processChildren;
|
|
3500
|
+
/** @type {?} */
|
|
3501
|
+
Position.prototype.index;
|
|
3502
|
+
}
|
|
2626
3503
|
/**
|
|
2627
3504
|
* @param {?} nav
|
|
2628
3505
|
* @param {?} tree
|
|
@@ -3144,6 +4021,28 @@ class ActivateRoutes {
|
|
|
3144
4021
|
}
|
|
3145
4022
|
}
|
|
3146
4023
|
}
|
|
4024
|
+
if (false) {
|
|
4025
|
+
/**
|
|
4026
|
+
* @type {?}
|
|
4027
|
+
* @private
|
|
4028
|
+
*/
|
|
4029
|
+
ActivateRoutes.prototype.routeReuseStrategy;
|
|
4030
|
+
/**
|
|
4031
|
+
* @type {?}
|
|
4032
|
+
* @private
|
|
4033
|
+
*/
|
|
4034
|
+
ActivateRoutes.prototype.futureState;
|
|
4035
|
+
/**
|
|
4036
|
+
* @type {?}
|
|
4037
|
+
* @private
|
|
4038
|
+
*/
|
|
4039
|
+
ActivateRoutes.prototype.currState;
|
|
4040
|
+
/**
|
|
4041
|
+
* @type {?}
|
|
4042
|
+
* @private
|
|
4043
|
+
*/
|
|
4044
|
+
ActivateRoutes.prototype.forwardEvent;
|
|
4045
|
+
}
|
|
3147
4046
|
/**
|
|
3148
4047
|
* @param {?} node
|
|
3149
4048
|
* @return {?}
|
|
@@ -3245,6 +4144,10 @@ class NoMatch {
|
|
|
3245
4144
|
*/
|
|
3246
4145
|
constructor(segmentGroup) { this.segmentGroup = segmentGroup || null; }
|
|
3247
4146
|
}
|
|
4147
|
+
if (false) {
|
|
4148
|
+
/** @type {?} */
|
|
4149
|
+
NoMatch.prototype.segmentGroup;
|
|
4150
|
+
}
|
|
3248
4151
|
class AbsoluteRedirect {
|
|
3249
4152
|
/**
|
|
3250
4153
|
* @param {?} urlTree
|
|
@@ -3253,6 +4156,10 @@ class AbsoluteRedirect {
|
|
|
3253
4156
|
this.urlTree = urlTree;
|
|
3254
4157
|
}
|
|
3255
4158
|
}
|
|
4159
|
+
if (false) {
|
|
4160
|
+
/** @type {?} */
|
|
4161
|
+
AbsoluteRedirect.prototype.urlTree;
|
|
4162
|
+
}
|
|
3256
4163
|
/**
|
|
3257
4164
|
* @param {?} segmentGroup
|
|
3258
4165
|
* @return {?}
|
|
@@ -3832,6 +4739,38 @@ class ApplyRedirects {
|
|
|
3832
4739
|
return redirectToUrlSegment;
|
|
3833
4740
|
}
|
|
3834
4741
|
}
|
|
4742
|
+
if (false) {
|
|
4743
|
+
/**
|
|
4744
|
+
* @type {?}
|
|
4745
|
+
* @private
|
|
4746
|
+
*/
|
|
4747
|
+
ApplyRedirects.prototype.allowRedirects;
|
|
4748
|
+
/**
|
|
4749
|
+
* @type {?}
|
|
4750
|
+
* @private
|
|
4751
|
+
*/
|
|
4752
|
+
ApplyRedirects.prototype.ngModule;
|
|
4753
|
+
/**
|
|
4754
|
+
* @type {?}
|
|
4755
|
+
* @private
|
|
4756
|
+
*/
|
|
4757
|
+
ApplyRedirects.prototype.configLoader;
|
|
4758
|
+
/**
|
|
4759
|
+
* @type {?}
|
|
4760
|
+
* @private
|
|
4761
|
+
*/
|
|
4762
|
+
ApplyRedirects.prototype.urlSerializer;
|
|
4763
|
+
/**
|
|
4764
|
+
* @type {?}
|
|
4765
|
+
* @private
|
|
4766
|
+
*/
|
|
4767
|
+
ApplyRedirects.prototype.urlTree;
|
|
4768
|
+
/**
|
|
4769
|
+
* @type {?}
|
|
4770
|
+
* @private
|
|
4771
|
+
*/
|
|
4772
|
+
ApplyRedirects.prototype.config;
|
|
4773
|
+
}
|
|
3835
4774
|
/**
|
|
3836
4775
|
* @param {?} moduleInjector
|
|
3837
4776
|
* @param {?} route
|
|
@@ -4058,6 +4997,12 @@ class CanActivate {
|
|
|
4058
4997
|
this.route = this.path[this.path.length - 1];
|
|
4059
4998
|
}
|
|
4060
4999
|
}
|
|
5000
|
+
if (false) {
|
|
5001
|
+
/** @type {?} */
|
|
5002
|
+
CanActivate.prototype.route;
|
|
5003
|
+
/** @type {?} */
|
|
5004
|
+
CanActivate.prototype.path;
|
|
5005
|
+
}
|
|
4061
5006
|
class CanDeactivate {
|
|
4062
5007
|
/**
|
|
4063
5008
|
* @param {?} component
|
|
@@ -4068,6 +5013,12 @@ class CanDeactivate {
|
|
|
4068
5013
|
this.route = route;
|
|
4069
5014
|
}
|
|
4070
5015
|
}
|
|
5016
|
+
if (false) {
|
|
5017
|
+
/** @type {?} */
|
|
5018
|
+
CanDeactivate.prototype.component;
|
|
5019
|
+
/** @type {?} */
|
|
5020
|
+
CanDeactivate.prototype.route;
|
|
5021
|
+
}
|
|
4071
5022
|
/**
|
|
4072
5023
|
* @param {?} future
|
|
4073
5024
|
* @param {?} curr
|
|
@@ -4790,6 +5741,38 @@ class Recognizer {
|
|
|
4790
5741
|
return [new TreeNode(snapshot, children)];
|
|
4791
5742
|
}
|
|
4792
5743
|
}
|
|
5744
|
+
if (false) {
|
|
5745
|
+
/**
|
|
5746
|
+
* @type {?}
|
|
5747
|
+
* @private
|
|
5748
|
+
*/
|
|
5749
|
+
Recognizer.prototype.rootComponentType;
|
|
5750
|
+
/**
|
|
5751
|
+
* @type {?}
|
|
5752
|
+
* @private
|
|
5753
|
+
*/
|
|
5754
|
+
Recognizer.prototype.config;
|
|
5755
|
+
/**
|
|
5756
|
+
* @type {?}
|
|
5757
|
+
* @private
|
|
5758
|
+
*/
|
|
5759
|
+
Recognizer.prototype.urlTree;
|
|
5760
|
+
/**
|
|
5761
|
+
* @type {?}
|
|
5762
|
+
* @private
|
|
5763
|
+
*/
|
|
5764
|
+
Recognizer.prototype.url;
|
|
5765
|
+
/**
|
|
5766
|
+
* @type {?}
|
|
5767
|
+
* @private
|
|
5768
|
+
*/
|
|
5769
|
+
Recognizer.prototype.paramsInheritanceStrategy;
|
|
5770
|
+
/**
|
|
5771
|
+
* @type {?}
|
|
5772
|
+
* @private
|
|
5773
|
+
*/
|
|
5774
|
+
Recognizer.prototype.relativeLinkResolution;
|
|
5775
|
+
}
|
|
4793
5776
|
/**
|
|
4794
5777
|
* @param {?} nodes
|
|
4795
5778
|
* @return {?}
|
|
@@ -4821,6 +5804,18 @@ function getChildConfig(route) {
|
|
|
4821
5804
|
}
|
|
4822
5805
|
return [];
|
|
4823
5806
|
}
|
|
5807
|
+
/**
|
|
5808
|
+
* @record
|
|
5809
|
+
*/
|
|
5810
|
+
function MatchResult() { }
|
|
5811
|
+
if (false) {
|
|
5812
|
+
/** @type {?} */
|
|
5813
|
+
MatchResult.prototype.consumedSegments;
|
|
5814
|
+
/** @type {?} */
|
|
5815
|
+
MatchResult.prototype.lastChild;
|
|
5816
|
+
/** @type {?} */
|
|
5817
|
+
MatchResult.prototype.parameters;
|
|
5818
|
+
}
|
|
4824
5819
|
/**
|
|
4825
5820
|
* @param {?} segmentGroup
|
|
4826
5821
|
* @param {?} route
|
|
@@ -5267,6 +6262,47 @@ function switchTap(next) {
|
|
|
5267
6262
|
*/
|
|
5268
6263
|
class RouteReuseStrategy {
|
|
5269
6264
|
}
|
|
6265
|
+
if (false) {
|
|
6266
|
+
/**
|
|
6267
|
+
* Determines if this route (and its subtree) should be detached to be reused later
|
|
6268
|
+
* @abstract
|
|
6269
|
+
* @param {?} route
|
|
6270
|
+
* @return {?}
|
|
6271
|
+
*/
|
|
6272
|
+
RouteReuseStrategy.prototype.shouldDetach = function (route) { };
|
|
6273
|
+
/**
|
|
6274
|
+
* Stores the detached route.
|
|
6275
|
+
*
|
|
6276
|
+
* Storing a `null` value should erase the previously stored value.
|
|
6277
|
+
* @abstract
|
|
6278
|
+
* @param {?} route
|
|
6279
|
+
* @param {?} handle
|
|
6280
|
+
* @return {?}
|
|
6281
|
+
*/
|
|
6282
|
+
RouteReuseStrategy.prototype.store = function (route, handle) { };
|
|
6283
|
+
/**
|
|
6284
|
+
* Determines if this route (and its subtree) should be reattached
|
|
6285
|
+
* @abstract
|
|
6286
|
+
* @param {?} route
|
|
6287
|
+
* @return {?}
|
|
6288
|
+
*/
|
|
6289
|
+
RouteReuseStrategy.prototype.shouldAttach = function (route) { };
|
|
6290
|
+
/**
|
|
6291
|
+
* Retrieves the previously stored route
|
|
6292
|
+
* @abstract
|
|
6293
|
+
* @param {?} route
|
|
6294
|
+
* @return {?}
|
|
6295
|
+
*/
|
|
6296
|
+
RouteReuseStrategy.prototype.retrieve = function (route) { };
|
|
6297
|
+
/**
|
|
6298
|
+
* Determines if a route should be reused
|
|
6299
|
+
* @abstract
|
|
6300
|
+
* @param {?} future
|
|
6301
|
+
* @param {?} curr
|
|
6302
|
+
* @return {?}
|
|
6303
|
+
*/
|
|
6304
|
+
RouteReuseStrategy.prototype.shouldReuseRoute = function (future, curr) { };
|
|
6305
|
+
}
|
|
5270
6306
|
/**
|
|
5271
6307
|
* Does not detach any subtrees. Reuses routes as long as their route config is the same.
|
|
5272
6308
|
*/
|
|
@@ -5375,6 +6411,28 @@ class RouterConfigLoader {
|
|
|
5375
6411
|
}
|
|
5376
6412
|
}
|
|
5377
6413
|
}
|
|
6414
|
+
if (false) {
|
|
6415
|
+
/**
|
|
6416
|
+
* @type {?}
|
|
6417
|
+
* @private
|
|
6418
|
+
*/
|
|
6419
|
+
RouterConfigLoader.prototype.loader;
|
|
6420
|
+
/**
|
|
6421
|
+
* @type {?}
|
|
6422
|
+
* @private
|
|
6423
|
+
*/
|
|
6424
|
+
RouterConfigLoader.prototype.compiler;
|
|
6425
|
+
/**
|
|
6426
|
+
* @type {?}
|
|
6427
|
+
* @private
|
|
6428
|
+
*/
|
|
6429
|
+
RouterConfigLoader.prototype.onLoadStartListener;
|
|
6430
|
+
/**
|
|
6431
|
+
* @type {?}
|
|
6432
|
+
* @private
|
|
6433
|
+
*/
|
|
6434
|
+
RouterConfigLoader.prototype.onLoadEndListener;
|
|
6435
|
+
}
|
|
5378
6436
|
|
|
5379
6437
|
/**
|
|
5380
6438
|
* @fileoverview added by tsickle
|
|
@@ -5397,6 +6455,36 @@ class RouterConfigLoader {
|
|
|
5397
6455
|
*/
|
|
5398
6456
|
class UrlHandlingStrategy {
|
|
5399
6457
|
}
|
|
6458
|
+
if (false) {
|
|
6459
|
+
/**
|
|
6460
|
+
* Tells the router if this URL should be processed.
|
|
6461
|
+
*
|
|
6462
|
+
* When it returns true, the router will execute the regular navigation.
|
|
6463
|
+
* When it returns false, the router will set the router state to an empty state.
|
|
6464
|
+
* As a result, all the active components will be destroyed.
|
|
6465
|
+
*
|
|
6466
|
+
* @abstract
|
|
6467
|
+
* @param {?} url
|
|
6468
|
+
* @return {?}
|
|
6469
|
+
*/
|
|
6470
|
+
UrlHandlingStrategy.prototype.shouldProcessUrl = function (url) { };
|
|
6471
|
+
/**
|
|
6472
|
+
* Extracts the part of the URL that should be handled by the router.
|
|
6473
|
+
* The rest of the URL will remain untouched.
|
|
6474
|
+
* @abstract
|
|
6475
|
+
* @param {?} url
|
|
6476
|
+
* @return {?}
|
|
6477
|
+
*/
|
|
6478
|
+
UrlHandlingStrategy.prototype.extract = function (url) { };
|
|
6479
|
+
/**
|
|
6480
|
+
* Merges the URL fragment with the rest of the URL.
|
|
6481
|
+
* @abstract
|
|
6482
|
+
* @param {?} newUrlPart
|
|
6483
|
+
* @param {?} rawUrl
|
|
6484
|
+
* @return {?}
|
|
6485
|
+
*/
|
|
6486
|
+
UrlHandlingStrategy.prototype.merge = function (newUrlPart, rawUrl) { };
|
|
6487
|
+
}
|
|
5400
6488
|
/**
|
|
5401
6489
|
* \@publicApi
|
|
5402
6490
|
*/
|
|
@@ -5423,6 +6511,139 @@ class DefaultUrlHandlingStrategy {
|
|
|
5423
6511
|
* @fileoverview added by tsickle
|
|
5424
6512
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5425
6513
|
*/
|
|
6514
|
+
/**
|
|
6515
|
+
* \@description
|
|
6516
|
+
*
|
|
6517
|
+
* Options that modify the navigation strategy.
|
|
6518
|
+
*
|
|
6519
|
+
* \@publicApi
|
|
6520
|
+
* @record
|
|
6521
|
+
*/
|
|
6522
|
+
function NavigationExtras() { }
|
|
6523
|
+
if (false) {
|
|
6524
|
+
/**
|
|
6525
|
+
* Specifies a root URI to use for relative navigation.
|
|
6526
|
+
*
|
|
6527
|
+
* For example, consider the following route configuration where the parent route
|
|
6528
|
+
* has two children.
|
|
6529
|
+
*
|
|
6530
|
+
* ```
|
|
6531
|
+
* [{
|
|
6532
|
+
* path: 'parent',
|
|
6533
|
+
* component: ParentComponent,
|
|
6534
|
+
* children: [{
|
|
6535
|
+
* path: 'list',
|
|
6536
|
+
* component: ListComponent
|
|
6537
|
+
* },{
|
|
6538
|
+
* path: 'child',
|
|
6539
|
+
* component: ChildComponent
|
|
6540
|
+
* }]
|
|
6541
|
+
* }]
|
|
6542
|
+
* ```
|
|
6543
|
+
*
|
|
6544
|
+
* The following `go()` function navigates to the `list` route by
|
|
6545
|
+
* interpreting the destination URI as relative to the activated `child` route
|
|
6546
|
+
*
|
|
6547
|
+
* ```
|
|
6548
|
+
* \@Component({...})
|
|
6549
|
+
* class ChildComponent {
|
|
6550
|
+
* constructor(private router: Router, private route: ActivatedRoute) {}
|
|
6551
|
+
*
|
|
6552
|
+
* go() {
|
|
6553
|
+
* this.router.navigate(['../list'], { relativeTo: this.route });
|
|
6554
|
+
* }
|
|
6555
|
+
* }
|
|
6556
|
+
* ```
|
|
6557
|
+
* @type {?|undefined}
|
|
6558
|
+
*/
|
|
6559
|
+
NavigationExtras.prototype.relativeTo;
|
|
6560
|
+
/**
|
|
6561
|
+
* Sets query parameters to the URL.
|
|
6562
|
+
*
|
|
6563
|
+
* ```
|
|
6564
|
+
* // Navigate to /results?page=1
|
|
6565
|
+
* this.router.navigate(['/results'], { queryParams: { page: 1 } });
|
|
6566
|
+
* ```
|
|
6567
|
+
* @type {?|undefined}
|
|
6568
|
+
*/
|
|
6569
|
+
NavigationExtras.prototype.queryParams;
|
|
6570
|
+
/**
|
|
6571
|
+
* Sets the hash fragment for the URL.
|
|
6572
|
+
*
|
|
6573
|
+
* ```
|
|
6574
|
+
* // Navigate to /results#top
|
|
6575
|
+
* this.router.navigate(['/results'], { fragment: 'top' });
|
|
6576
|
+
* ```
|
|
6577
|
+
* @type {?|undefined}
|
|
6578
|
+
*/
|
|
6579
|
+
NavigationExtras.prototype.fragment;
|
|
6580
|
+
/**
|
|
6581
|
+
* **DEPRECATED**: Use `queryParamsHandling: "preserve"` instead to preserve
|
|
6582
|
+
* query parameters for the next navigation.
|
|
6583
|
+
*
|
|
6584
|
+
* @deprecated since v4
|
|
6585
|
+
* @type {?|undefined}
|
|
6586
|
+
*/
|
|
6587
|
+
NavigationExtras.prototype.preserveQueryParams;
|
|
6588
|
+
/**
|
|
6589
|
+
* How to handle query parameters in the router link for the next navigation.
|
|
6590
|
+
* One of:
|
|
6591
|
+
* * `merge` : Merge new with current parameters.
|
|
6592
|
+
* * `preserve` : Preserve current parameters.
|
|
6593
|
+
*
|
|
6594
|
+
* ```
|
|
6595
|
+
* // from /results?page=1 to /view?page=1&page=2
|
|
6596
|
+
* this.router.navigate(['/view'], { queryParams: { page: 2 }, queryParamsHandling: "merge" });
|
|
6597
|
+
* ```
|
|
6598
|
+
* @type {?|undefined}
|
|
6599
|
+
*/
|
|
6600
|
+
NavigationExtras.prototype.queryParamsHandling;
|
|
6601
|
+
/**
|
|
6602
|
+
* When true, preserves the URL fragment for the next navigation
|
|
6603
|
+
*
|
|
6604
|
+
* ```
|
|
6605
|
+
* // Preserve fragment from /results#top to /view#top
|
|
6606
|
+
* this.router.navigate(['/view'], { preserveFragment: true });
|
|
6607
|
+
* ```
|
|
6608
|
+
* @type {?|undefined}
|
|
6609
|
+
*/
|
|
6610
|
+
NavigationExtras.prototype.preserveFragment;
|
|
6611
|
+
/**
|
|
6612
|
+
* When true, navigates without pushing a new state into history.
|
|
6613
|
+
*
|
|
6614
|
+
* ```
|
|
6615
|
+
* // Navigate silently to /view
|
|
6616
|
+
* this.router.navigate(['/view'], { skipLocationChange: true });
|
|
6617
|
+
* ```
|
|
6618
|
+
* @type {?|undefined}
|
|
6619
|
+
*/
|
|
6620
|
+
NavigationExtras.prototype.skipLocationChange;
|
|
6621
|
+
/**
|
|
6622
|
+
* When true, navigates while replacing the current state in history.
|
|
6623
|
+
*
|
|
6624
|
+
* ```
|
|
6625
|
+
* // Navigate to /view
|
|
6626
|
+
* this.router.navigate(['/view'], { replaceUrl: true });
|
|
6627
|
+
* ```
|
|
6628
|
+
* @type {?|undefined}
|
|
6629
|
+
*/
|
|
6630
|
+
NavigationExtras.prototype.replaceUrl;
|
|
6631
|
+
/**
|
|
6632
|
+
* Developer-defined state that can be passed to any navigation.
|
|
6633
|
+
* Access this value through the `Navigation.extras` object
|
|
6634
|
+
* returned from `router.getCurrentNavigation()` while a navigation is executing.
|
|
6635
|
+
*
|
|
6636
|
+
* After a navigation completes, the router writes an object containing this
|
|
6637
|
+
* value together with a `navigationId` to `history.state`.
|
|
6638
|
+
* The value is written when `location.go()` or `location.replaceState()`
|
|
6639
|
+
* is called before activating this route.
|
|
6640
|
+
*
|
|
6641
|
+
* Note that `history.state` does not pass an object equality test because
|
|
6642
|
+
* the router adds the `navigationId` on each navigation.
|
|
6643
|
+
* @type {?|undefined}
|
|
6644
|
+
*/
|
|
6645
|
+
NavigationExtras.prototype.state;
|
|
6646
|
+
}
|
|
5426
6647
|
/**
|
|
5427
6648
|
* @param {?} error
|
|
5428
6649
|
* @return {?}
|
|
@@ -5451,7 +6672,7 @@ function defaultRouterHook(snapshot, runExtras) {
|
|
|
5451
6672
|
/**
|
|
5452
6673
|
* \@description
|
|
5453
6674
|
*
|
|
5454
|
-
*
|
|
6675
|
+
* A service that provides navigation and URL manipulation capabilities.
|
|
5455
6676
|
*
|
|
5456
6677
|
* @see `Route`.
|
|
5457
6678
|
* @see [Routing and Navigation Guide](guide/router).
|
|
@@ -6376,44 +7597,220 @@ class Router {
|
|
|
6376
7597
|
}
|
|
6377
7598
|
/**
|
|
6378
7599
|
* @private
|
|
6379
|
-
* @param {?} url
|
|
6380
|
-
* @param {?} replaceUrl
|
|
6381
|
-
* @param {?} id
|
|
6382
|
-
* @param {?=} state
|
|
6383
|
-
* @return {?}
|
|
7600
|
+
* @param {?} url
|
|
7601
|
+
* @param {?} replaceUrl
|
|
7602
|
+
* @param {?} id
|
|
7603
|
+
* @param {?=} state
|
|
7604
|
+
* @return {?}
|
|
7605
|
+
*/
|
|
7606
|
+
setBrowserUrl(url, replaceUrl, id, state) {
|
|
7607
|
+
/** @type {?} */
|
|
7608
|
+
const path = this.urlSerializer.serialize(url);
|
|
7609
|
+
state = state || {};
|
|
7610
|
+
if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {
|
|
7611
|
+
// TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.
|
|
7612
|
+
this.location.replaceState(path, '', Object.assign({}, state, { navigationId: id }));
|
|
7613
|
+
}
|
|
7614
|
+
else {
|
|
7615
|
+
this.location.go(path, '', Object.assign({}, state, { navigationId: id }));
|
|
7616
|
+
}
|
|
7617
|
+
}
|
|
7618
|
+
/**
|
|
7619
|
+
* @private
|
|
7620
|
+
* @param {?} storedState
|
|
7621
|
+
* @param {?} storedUrl
|
|
7622
|
+
* @param {?} rawUrl
|
|
7623
|
+
* @return {?}
|
|
7624
|
+
*/
|
|
7625
|
+
resetStateAndUrl(storedState, storedUrl, rawUrl) {
|
|
7626
|
+
((/** @type {?} */ (this))).routerState = storedState;
|
|
7627
|
+
this.currentUrlTree = storedUrl;
|
|
7628
|
+
this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);
|
|
7629
|
+
this.resetUrlToCurrentUrlTree();
|
|
7630
|
+
}
|
|
7631
|
+
/**
|
|
7632
|
+
* @private
|
|
7633
|
+
* @return {?}
|
|
7634
|
+
*/
|
|
7635
|
+
resetUrlToCurrentUrlTree() {
|
|
7636
|
+
this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', { navigationId: this.lastSuccessfulId });
|
|
7637
|
+
}
|
|
7638
|
+
}
|
|
7639
|
+
if (false) {
|
|
7640
|
+
/**
|
|
7641
|
+
* @type {?}
|
|
7642
|
+
* @private
|
|
7643
|
+
*/
|
|
7644
|
+
Router.prototype.currentUrlTree;
|
|
7645
|
+
/**
|
|
7646
|
+
* @type {?}
|
|
7647
|
+
* @private
|
|
7648
|
+
*/
|
|
7649
|
+
Router.prototype.rawUrlTree;
|
|
7650
|
+
/**
|
|
7651
|
+
* @type {?}
|
|
7652
|
+
* @private
|
|
7653
|
+
*/
|
|
7654
|
+
Router.prototype.browserUrlTree;
|
|
7655
|
+
/**
|
|
7656
|
+
* @type {?}
|
|
7657
|
+
* @private
|
|
7658
|
+
*/
|
|
7659
|
+
Router.prototype.transitions;
|
|
7660
|
+
/**
|
|
7661
|
+
* @type {?}
|
|
7662
|
+
* @private
|
|
7663
|
+
*/
|
|
7664
|
+
Router.prototype.navigations;
|
|
7665
|
+
/**
|
|
7666
|
+
* @type {?}
|
|
7667
|
+
* @private
|
|
7668
|
+
*/
|
|
7669
|
+
Router.prototype.lastSuccessfulNavigation;
|
|
7670
|
+
/**
|
|
7671
|
+
* @type {?}
|
|
7672
|
+
* @private
|
|
7673
|
+
*/
|
|
7674
|
+
Router.prototype.currentNavigation;
|
|
7675
|
+
/**
|
|
7676
|
+
* @type {?}
|
|
7677
|
+
* @private
|
|
7678
|
+
*/
|
|
7679
|
+
Router.prototype.locationSubscription;
|
|
7680
|
+
/**
|
|
7681
|
+
* @type {?}
|
|
7682
|
+
* @private
|
|
7683
|
+
*/
|
|
7684
|
+
Router.prototype.navigationId;
|
|
7685
|
+
/**
|
|
7686
|
+
* @type {?}
|
|
7687
|
+
* @private
|
|
7688
|
+
*/
|
|
7689
|
+
Router.prototype.configLoader;
|
|
7690
|
+
/**
|
|
7691
|
+
* @type {?}
|
|
7692
|
+
* @private
|
|
7693
|
+
*/
|
|
7694
|
+
Router.prototype.ngModule;
|
|
7695
|
+
/**
|
|
7696
|
+
* @type {?}
|
|
7697
|
+
* @private
|
|
7698
|
+
*/
|
|
7699
|
+
Router.prototype.console;
|
|
7700
|
+
/**
|
|
7701
|
+
* @type {?}
|
|
7702
|
+
* @private
|
|
7703
|
+
*/
|
|
7704
|
+
Router.prototype.isNgZoneEnabled;
|
|
7705
|
+
/**
|
|
7706
|
+
* An event stream for routing events in this NgModule.
|
|
7707
|
+
* @type {?}
|
|
7708
|
+
*/
|
|
7709
|
+
Router.prototype.events;
|
|
7710
|
+
/**
|
|
7711
|
+
* The current state of routing in this NgModule.
|
|
7712
|
+
* @type {?}
|
|
7713
|
+
*/
|
|
7714
|
+
Router.prototype.routerState;
|
|
7715
|
+
/**
|
|
7716
|
+
* A handler for navigation errors in this NgModule.
|
|
7717
|
+
* @type {?}
|
|
7718
|
+
*/
|
|
7719
|
+
Router.prototype.errorHandler;
|
|
7720
|
+
/**
|
|
7721
|
+
* A handler for errors thrown by `Router.parseUrl(url)`
|
|
7722
|
+
* when `url` contains an invalid character.
|
|
7723
|
+
* The most common case is a `%` sign
|
|
7724
|
+
* that's not encoded and is not part of a percent encoded sequence.
|
|
7725
|
+
* @type {?}
|
|
7726
|
+
*/
|
|
7727
|
+
Router.prototype.malformedUriErrorHandler;
|
|
7728
|
+
/**
|
|
7729
|
+
* True if at least one navigation event has occurred,
|
|
7730
|
+
* false otherwise.
|
|
7731
|
+
* @type {?}
|
|
7732
|
+
*/
|
|
7733
|
+
Router.prototype.navigated;
|
|
7734
|
+
/**
|
|
7735
|
+
* @type {?}
|
|
7736
|
+
* @private
|
|
7737
|
+
*/
|
|
7738
|
+
Router.prototype.lastSuccessfulId;
|
|
7739
|
+
/**
|
|
7740
|
+
* Hooks that enable you to pause navigation,
|
|
7741
|
+
* either before or after the preactivation phase.
|
|
7742
|
+
* Used by `RouterModule`.
|
|
7743
|
+
*
|
|
7744
|
+
* \@internal
|
|
7745
|
+
* @type {?}
|
|
7746
|
+
*/
|
|
7747
|
+
Router.prototype.hooks;
|
|
7748
|
+
/**
|
|
7749
|
+
* A strategy for extracting and merging URLs.
|
|
7750
|
+
* Used for AngularJS to Angular migrations.
|
|
7751
|
+
* @type {?}
|
|
7752
|
+
*/
|
|
7753
|
+
Router.prototype.urlHandlingStrategy;
|
|
7754
|
+
/**
|
|
7755
|
+
* A strategy for re-using routes.
|
|
7756
|
+
* @type {?}
|
|
7757
|
+
*/
|
|
7758
|
+
Router.prototype.routeReuseStrategy;
|
|
7759
|
+
/**
|
|
7760
|
+
* How to handle a navigation request to the current URL. One of:
|
|
7761
|
+
* - `'ignore'` : The router ignores the request.
|
|
7762
|
+
* - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature.
|
|
7763
|
+
* @type {?}
|
|
7764
|
+
*/
|
|
7765
|
+
Router.prototype.onSameUrlNavigation;
|
|
7766
|
+
/**
|
|
7767
|
+
* How to merge parameters, data, and resolved data from parent to child
|
|
7768
|
+
* routes. One of:
|
|
7769
|
+
*
|
|
7770
|
+
* - `'emptyOnly'` : Inherit parent parameters, data, and resolved data
|
|
7771
|
+
* for path-less or component-less routes.
|
|
7772
|
+
* - `'always'` : Inherit parent parameters, data, and resolved data
|
|
7773
|
+
* for all child routes.
|
|
7774
|
+
* @type {?}
|
|
7775
|
+
*/
|
|
7776
|
+
Router.prototype.paramsInheritanceStrategy;
|
|
7777
|
+
/**
|
|
7778
|
+
* Determines when the router updates the browser URL.
|
|
7779
|
+
* By default (`"deferred"`), udates the browser URL after navigation has finished.
|
|
7780
|
+
* Set to `'eager'` to update the browser URL at the beginning of navigation.
|
|
7781
|
+
* You can choose to update early so that, if navigation fails,
|
|
7782
|
+
* you can show an error message with the URL that failed.
|
|
7783
|
+
* @type {?}
|
|
7784
|
+
*/
|
|
7785
|
+
Router.prototype.urlUpdateStrategy;
|
|
7786
|
+
/**
|
|
7787
|
+
* Enables a bug fix that corrects relative link resolution in components with empty paths.
|
|
7788
|
+
* @see `RouterModule`
|
|
7789
|
+
* @type {?}
|
|
7790
|
+
*/
|
|
7791
|
+
Router.prototype.relativeLinkResolution;
|
|
7792
|
+
/**
|
|
7793
|
+
* @type {?}
|
|
7794
|
+
* @private
|
|
6384
7795
|
*/
|
|
6385
|
-
|
|
6386
|
-
/** @type {?} */
|
|
6387
|
-
const path = this.urlSerializer.serialize(url);
|
|
6388
|
-
state = state || {};
|
|
6389
|
-
if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {
|
|
6390
|
-
// TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.
|
|
6391
|
-
this.location.replaceState(path, '', Object.assign({}, state, { navigationId: id }));
|
|
6392
|
-
}
|
|
6393
|
-
else {
|
|
6394
|
-
this.location.go(path, '', Object.assign({}, state, { navigationId: id }));
|
|
6395
|
-
}
|
|
6396
|
-
}
|
|
7796
|
+
Router.prototype.rootComponentType;
|
|
6397
7797
|
/**
|
|
7798
|
+
* @type {?}
|
|
6398
7799
|
* @private
|
|
6399
|
-
* @param {?} storedState
|
|
6400
|
-
* @param {?} storedUrl
|
|
6401
|
-
* @param {?} rawUrl
|
|
6402
|
-
* @return {?}
|
|
6403
7800
|
*/
|
|
6404
|
-
|
|
6405
|
-
((/** @type {?} */ (this))).routerState = storedState;
|
|
6406
|
-
this.currentUrlTree = storedUrl;
|
|
6407
|
-
this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);
|
|
6408
|
-
this.resetUrlToCurrentUrlTree();
|
|
6409
|
-
}
|
|
7801
|
+
Router.prototype.urlSerializer;
|
|
6410
7802
|
/**
|
|
7803
|
+
* @type {?}
|
|
6411
7804
|
* @private
|
|
6412
|
-
* @return {?}
|
|
6413
7805
|
*/
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
7806
|
+
Router.prototype.rootContexts;
|
|
7807
|
+
/**
|
|
7808
|
+
* @type {?}
|
|
7809
|
+
* @private
|
|
7810
|
+
*/
|
|
7811
|
+
Router.prototype.location;
|
|
7812
|
+
/** @type {?} */
|
|
7813
|
+
Router.prototype.config;
|
|
6417
7814
|
}
|
|
6418
7815
|
/**
|
|
6419
7816
|
* @param {?} commands
|
|
@@ -6615,6 +8012,42 @@ RouterLink.propDecorators = {
|
|
|
6615
8012
|
preserveQueryParams: [{ type: Input }],
|
|
6616
8013
|
onClick: [{ type: HostListener, args: ['click',] }]
|
|
6617
8014
|
};
|
|
8015
|
+
if (false) {
|
|
8016
|
+
/** @type {?} */
|
|
8017
|
+
RouterLink.prototype.queryParams;
|
|
8018
|
+
/** @type {?} */
|
|
8019
|
+
RouterLink.prototype.fragment;
|
|
8020
|
+
/** @type {?} */
|
|
8021
|
+
RouterLink.prototype.queryParamsHandling;
|
|
8022
|
+
/** @type {?} */
|
|
8023
|
+
RouterLink.prototype.preserveFragment;
|
|
8024
|
+
/** @type {?} */
|
|
8025
|
+
RouterLink.prototype.skipLocationChange;
|
|
8026
|
+
/** @type {?} */
|
|
8027
|
+
RouterLink.prototype.replaceUrl;
|
|
8028
|
+
/** @type {?} */
|
|
8029
|
+
RouterLink.prototype.state;
|
|
8030
|
+
/**
|
|
8031
|
+
* @type {?}
|
|
8032
|
+
* @private
|
|
8033
|
+
*/
|
|
8034
|
+
RouterLink.prototype.commands;
|
|
8035
|
+
/**
|
|
8036
|
+
* @type {?}
|
|
8037
|
+
* @private
|
|
8038
|
+
*/
|
|
8039
|
+
RouterLink.prototype.preserve;
|
|
8040
|
+
/**
|
|
8041
|
+
* @type {?}
|
|
8042
|
+
* @private
|
|
8043
|
+
*/
|
|
8044
|
+
RouterLink.prototype.router;
|
|
8045
|
+
/**
|
|
8046
|
+
* @type {?}
|
|
8047
|
+
* @private
|
|
8048
|
+
*/
|
|
8049
|
+
RouterLink.prototype.route;
|
|
8050
|
+
}
|
|
6618
8051
|
/**
|
|
6619
8052
|
* \@description
|
|
6620
8053
|
*
|
|
@@ -6745,6 +8178,56 @@ RouterLinkWithHref.propDecorators = {
|
|
|
6745
8178
|
preserveQueryParams: [{ type: Input }],
|
|
6746
8179
|
onClick: [{ type: HostListener, args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'],] }]
|
|
6747
8180
|
};
|
|
8181
|
+
if (false) {
|
|
8182
|
+
/** @type {?} */
|
|
8183
|
+
RouterLinkWithHref.prototype.target;
|
|
8184
|
+
/** @type {?} */
|
|
8185
|
+
RouterLinkWithHref.prototype.queryParams;
|
|
8186
|
+
/** @type {?} */
|
|
8187
|
+
RouterLinkWithHref.prototype.fragment;
|
|
8188
|
+
/** @type {?} */
|
|
8189
|
+
RouterLinkWithHref.prototype.queryParamsHandling;
|
|
8190
|
+
/** @type {?} */
|
|
8191
|
+
RouterLinkWithHref.prototype.preserveFragment;
|
|
8192
|
+
/** @type {?} */
|
|
8193
|
+
RouterLinkWithHref.prototype.skipLocationChange;
|
|
8194
|
+
/** @type {?} */
|
|
8195
|
+
RouterLinkWithHref.prototype.replaceUrl;
|
|
8196
|
+
/** @type {?} */
|
|
8197
|
+
RouterLinkWithHref.prototype.state;
|
|
8198
|
+
/**
|
|
8199
|
+
* @type {?}
|
|
8200
|
+
* @private
|
|
8201
|
+
*/
|
|
8202
|
+
RouterLinkWithHref.prototype.commands;
|
|
8203
|
+
/**
|
|
8204
|
+
* @type {?}
|
|
8205
|
+
* @private
|
|
8206
|
+
*/
|
|
8207
|
+
RouterLinkWithHref.prototype.subscription;
|
|
8208
|
+
/**
|
|
8209
|
+
* @type {?}
|
|
8210
|
+
* @private
|
|
8211
|
+
*/
|
|
8212
|
+
RouterLinkWithHref.prototype.preserve;
|
|
8213
|
+
/** @type {?} */
|
|
8214
|
+
RouterLinkWithHref.prototype.href;
|
|
8215
|
+
/**
|
|
8216
|
+
* @type {?}
|
|
8217
|
+
* @private
|
|
8218
|
+
*/
|
|
8219
|
+
RouterLinkWithHref.prototype.router;
|
|
8220
|
+
/**
|
|
8221
|
+
* @type {?}
|
|
8222
|
+
* @private
|
|
8223
|
+
*/
|
|
8224
|
+
RouterLinkWithHref.prototype.route;
|
|
8225
|
+
/**
|
|
8226
|
+
* @type {?}
|
|
8227
|
+
* @private
|
|
8228
|
+
*/
|
|
8229
|
+
RouterLinkWithHref.prototype.locationStrategy;
|
|
8230
|
+
}
|
|
6748
8231
|
/**
|
|
6749
8232
|
* @param {?} s
|
|
6750
8233
|
* @return {?}
|
|
@@ -6953,6 +8436,51 @@ RouterLinkActive.propDecorators = {
|
|
|
6953
8436
|
routerLinkActiveOptions: [{ type: Input }],
|
|
6954
8437
|
routerLinkActive: [{ type: Input }]
|
|
6955
8438
|
};
|
|
8439
|
+
if (false) {
|
|
8440
|
+
/** @type {?} */
|
|
8441
|
+
RouterLinkActive.prototype.links;
|
|
8442
|
+
/** @type {?} */
|
|
8443
|
+
RouterLinkActive.prototype.linksWithHrefs;
|
|
8444
|
+
/**
|
|
8445
|
+
* @type {?}
|
|
8446
|
+
* @private
|
|
8447
|
+
*/
|
|
8448
|
+
RouterLinkActive.prototype.classes;
|
|
8449
|
+
/**
|
|
8450
|
+
* @type {?}
|
|
8451
|
+
* @private
|
|
8452
|
+
*/
|
|
8453
|
+
RouterLinkActive.prototype.subscription;
|
|
8454
|
+
/** @type {?} */
|
|
8455
|
+
RouterLinkActive.prototype.isActive;
|
|
8456
|
+
/** @type {?} */
|
|
8457
|
+
RouterLinkActive.prototype.routerLinkActiveOptions;
|
|
8458
|
+
/**
|
|
8459
|
+
* @type {?}
|
|
8460
|
+
* @private
|
|
8461
|
+
*/
|
|
8462
|
+
RouterLinkActive.prototype.router;
|
|
8463
|
+
/**
|
|
8464
|
+
* @type {?}
|
|
8465
|
+
* @private
|
|
8466
|
+
*/
|
|
8467
|
+
RouterLinkActive.prototype.element;
|
|
8468
|
+
/**
|
|
8469
|
+
* @type {?}
|
|
8470
|
+
* @private
|
|
8471
|
+
*/
|
|
8472
|
+
RouterLinkActive.prototype.renderer;
|
|
8473
|
+
/**
|
|
8474
|
+
* @type {?}
|
|
8475
|
+
* @private
|
|
8476
|
+
*/
|
|
8477
|
+
RouterLinkActive.prototype.link;
|
|
8478
|
+
/**
|
|
8479
|
+
* @type {?}
|
|
8480
|
+
* @private
|
|
8481
|
+
*/
|
|
8482
|
+
RouterLinkActive.prototype.linkWithHref;
|
|
8483
|
+
}
|
|
6956
8484
|
|
|
6957
8485
|
/**
|
|
6958
8486
|
* @fileoverview added by tsickle
|
|
@@ -6979,6 +8507,18 @@ class OutletContext {
|
|
|
6979
8507
|
this.attachRef = null;
|
|
6980
8508
|
}
|
|
6981
8509
|
}
|
|
8510
|
+
if (false) {
|
|
8511
|
+
/** @type {?} */
|
|
8512
|
+
OutletContext.prototype.outlet;
|
|
8513
|
+
/** @type {?} */
|
|
8514
|
+
OutletContext.prototype.route;
|
|
8515
|
+
/** @type {?} */
|
|
8516
|
+
OutletContext.prototype.resolver;
|
|
8517
|
+
/** @type {?} */
|
|
8518
|
+
OutletContext.prototype.children;
|
|
8519
|
+
/** @type {?} */
|
|
8520
|
+
OutletContext.prototype.attachRef;
|
|
8521
|
+
}
|
|
6982
8522
|
/**
|
|
6983
8523
|
* Store contextual information about the children (= nested) `RouterOutlet`
|
|
6984
8524
|
*
|
|
@@ -7050,6 +8590,13 @@ class ChildrenOutletContexts {
|
|
|
7050
8590
|
*/
|
|
7051
8591
|
getContext(childName) { return this.contexts.get(childName) || null; }
|
|
7052
8592
|
}
|
|
8593
|
+
if (false) {
|
|
8594
|
+
/**
|
|
8595
|
+
* @type {?}
|
|
8596
|
+
* @private
|
|
8597
|
+
*/
|
|
8598
|
+
ChildrenOutletContexts.prototype.contexts;
|
|
8599
|
+
}
|
|
7053
8600
|
|
|
7054
8601
|
/**
|
|
7055
8602
|
* @fileoverview added by tsickle
|
|
@@ -7233,6 +8780,47 @@ RouterOutlet.propDecorators = {
|
|
|
7233
8780
|
activateEvents: [{ type: Output, args: ['activate',] }],
|
|
7234
8781
|
deactivateEvents: [{ type: Output, args: ['deactivate',] }]
|
|
7235
8782
|
};
|
|
8783
|
+
if (false) {
|
|
8784
|
+
/**
|
|
8785
|
+
* @type {?}
|
|
8786
|
+
* @private
|
|
8787
|
+
*/
|
|
8788
|
+
RouterOutlet.prototype.activated;
|
|
8789
|
+
/**
|
|
8790
|
+
* @type {?}
|
|
8791
|
+
* @private
|
|
8792
|
+
*/
|
|
8793
|
+
RouterOutlet.prototype._activatedRoute;
|
|
8794
|
+
/**
|
|
8795
|
+
* @type {?}
|
|
8796
|
+
* @private
|
|
8797
|
+
*/
|
|
8798
|
+
RouterOutlet.prototype.name;
|
|
8799
|
+
/** @type {?} */
|
|
8800
|
+
RouterOutlet.prototype.activateEvents;
|
|
8801
|
+
/** @type {?} */
|
|
8802
|
+
RouterOutlet.prototype.deactivateEvents;
|
|
8803
|
+
/**
|
|
8804
|
+
* @type {?}
|
|
8805
|
+
* @private
|
|
8806
|
+
*/
|
|
8807
|
+
RouterOutlet.prototype.parentContexts;
|
|
8808
|
+
/**
|
|
8809
|
+
* @type {?}
|
|
8810
|
+
* @private
|
|
8811
|
+
*/
|
|
8812
|
+
RouterOutlet.prototype.location;
|
|
8813
|
+
/**
|
|
8814
|
+
* @type {?}
|
|
8815
|
+
* @private
|
|
8816
|
+
*/
|
|
8817
|
+
RouterOutlet.prototype.resolver;
|
|
8818
|
+
/**
|
|
8819
|
+
* @type {?}
|
|
8820
|
+
* @private
|
|
8821
|
+
*/
|
|
8822
|
+
RouterOutlet.prototype.changeDetector;
|
|
8823
|
+
}
|
|
7236
8824
|
class OutletInjector {
|
|
7237
8825
|
/**
|
|
7238
8826
|
* @param {?} route
|
|
@@ -7259,6 +8847,23 @@ class OutletInjector {
|
|
|
7259
8847
|
return this.parent.get(token, notFoundValue);
|
|
7260
8848
|
}
|
|
7261
8849
|
}
|
|
8850
|
+
if (false) {
|
|
8851
|
+
/**
|
|
8852
|
+
* @type {?}
|
|
8853
|
+
* @private
|
|
8854
|
+
*/
|
|
8855
|
+
OutletInjector.prototype.route;
|
|
8856
|
+
/**
|
|
8857
|
+
* @type {?}
|
|
8858
|
+
* @private
|
|
8859
|
+
*/
|
|
8860
|
+
OutletInjector.prototype.childContexts;
|
|
8861
|
+
/**
|
|
8862
|
+
* @type {?}
|
|
8863
|
+
* @private
|
|
8864
|
+
*/
|
|
8865
|
+
OutletInjector.prototype.parent;
|
|
8866
|
+
}
|
|
7262
8867
|
|
|
7263
8868
|
/**
|
|
7264
8869
|
* @fileoverview added by tsickle
|
|
@@ -7274,6 +8879,15 @@ class OutletInjector {
|
|
|
7274
8879
|
*/
|
|
7275
8880
|
class PreloadingStrategy {
|
|
7276
8881
|
}
|
|
8882
|
+
if (false) {
|
|
8883
|
+
/**
|
|
8884
|
+
* @abstract
|
|
8885
|
+
* @param {?} route
|
|
8886
|
+
* @param {?} fn
|
|
8887
|
+
* @return {?}
|
|
8888
|
+
*/
|
|
8889
|
+
PreloadingStrategy.prototype.preload = function (route, fn) { };
|
|
8890
|
+
}
|
|
7277
8891
|
/**
|
|
7278
8892
|
* \@description
|
|
7279
8893
|
*
|
|
@@ -7453,6 +9067,33 @@ RouterPreloader.ctorParameters = () => [
|
|
|
7453
9067
|
{ type: Injector },
|
|
7454
9068
|
{ type: PreloadingStrategy }
|
|
7455
9069
|
];
|
|
9070
|
+
if (false) {
|
|
9071
|
+
/**
|
|
9072
|
+
* @type {?}
|
|
9073
|
+
* @private
|
|
9074
|
+
*/
|
|
9075
|
+
RouterPreloader.prototype.loader;
|
|
9076
|
+
/**
|
|
9077
|
+
* @type {?}
|
|
9078
|
+
* @private
|
|
9079
|
+
*/
|
|
9080
|
+
RouterPreloader.prototype.subscription;
|
|
9081
|
+
/**
|
|
9082
|
+
* @type {?}
|
|
9083
|
+
* @private
|
|
9084
|
+
*/
|
|
9085
|
+
RouterPreloader.prototype.router;
|
|
9086
|
+
/**
|
|
9087
|
+
* @type {?}
|
|
9088
|
+
* @private
|
|
9089
|
+
*/
|
|
9090
|
+
RouterPreloader.prototype.injector;
|
|
9091
|
+
/**
|
|
9092
|
+
* @type {?}
|
|
9093
|
+
* @private
|
|
9094
|
+
*/
|
|
9095
|
+
RouterPreloader.prototype.preloadingStrategy;
|
|
9096
|
+
}
|
|
7456
9097
|
|
|
7457
9098
|
/**
|
|
7458
9099
|
* @fileoverview added by tsickle
|
|
@@ -7564,6 +9205,53 @@ class RouterScroller {
|
|
|
7564
9205
|
}
|
|
7565
9206
|
}
|
|
7566
9207
|
}
|
|
9208
|
+
if (false) {
|
|
9209
|
+
/**
|
|
9210
|
+
* @type {?}
|
|
9211
|
+
* @private
|
|
9212
|
+
*/
|
|
9213
|
+
RouterScroller.prototype.routerEventsSubscription;
|
|
9214
|
+
/**
|
|
9215
|
+
* @type {?}
|
|
9216
|
+
* @private
|
|
9217
|
+
*/
|
|
9218
|
+
RouterScroller.prototype.scrollEventsSubscription;
|
|
9219
|
+
/**
|
|
9220
|
+
* @type {?}
|
|
9221
|
+
* @private
|
|
9222
|
+
*/
|
|
9223
|
+
RouterScroller.prototype.lastId;
|
|
9224
|
+
/**
|
|
9225
|
+
* @type {?}
|
|
9226
|
+
* @private
|
|
9227
|
+
*/
|
|
9228
|
+
RouterScroller.prototype.lastSource;
|
|
9229
|
+
/**
|
|
9230
|
+
* @type {?}
|
|
9231
|
+
* @private
|
|
9232
|
+
*/
|
|
9233
|
+
RouterScroller.prototype.restoredId;
|
|
9234
|
+
/**
|
|
9235
|
+
* @type {?}
|
|
9236
|
+
* @private
|
|
9237
|
+
*/
|
|
9238
|
+
RouterScroller.prototype.store;
|
|
9239
|
+
/**
|
|
9240
|
+
* @type {?}
|
|
9241
|
+
* @private
|
|
9242
|
+
*/
|
|
9243
|
+
RouterScroller.prototype.router;
|
|
9244
|
+
/**
|
|
9245
|
+
* \@docsNotRequired
|
|
9246
|
+
* @type {?}
|
|
9247
|
+
*/
|
|
9248
|
+
RouterScroller.prototype.viewportScroller;
|
|
9249
|
+
/**
|
|
9250
|
+
* @type {?}
|
|
9251
|
+
* @private
|
|
9252
|
+
*/
|
|
9253
|
+
RouterScroller.prototype.options;
|
|
9254
|
+
}
|
|
7567
9255
|
|
|
7568
9256
|
/**
|
|
7569
9257
|
* @fileoverview added by tsickle
|
|
@@ -7790,6 +9478,171 @@ function provideRoutes(routes) {
|
|
|
7790
9478
|
{ provide: ROUTES, multi: true, useValue: routes },
|
|
7791
9479
|
];
|
|
7792
9480
|
}
|
|
9481
|
+
/**
|
|
9482
|
+
* A set of configuration options for a router module, provided in the
|
|
9483
|
+
* `forRoot()` method.
|
|
9484
|
+
*
|
|
9485
|
+
* \@publicApi
|
|
9486
|
+
* @record
|
|
9487
|
+
*/
|
|
9488
|
+
function ExtraOptions() { }
|
|
9489
|
+
if (false) {
|
|
9490
|
+
/**
|
|
9491
|
+
* When true, log all internal navigation events to the console.
|
|
9492
|
+
* Use for debugging.
|
|
9493
|
+
* @type {?|undefined}
|
|
9494
|
+
*/
|
|
9495
|
+
ExtraOptions.prototype.enableTracing;
|
|
9496
|
+
/**
|
|
9497
|
+
* When true, enable the location strategy that uses the URL fragment
|
|
9498
|
+
* instead of the history API.
|
|
9499
|
+
* @type {?|undefined}
|
|
9500
|
+
*/
|
|
9501
|
+
ExtraOptions.prototype.useHash;
|
|
9502
|
+
/**
|
|
9503
|
+
* One of `enabled` (the default) or `disabled`.
|
|
9504
|
+
* By default, the initial navigation starts before the root component is created.
|
|
9505
|
+
* The bootstrap is blocked until the initial navigation is complete.
|
|
9506
|
+
* When set to `disabled`, the initial navigation is not performed.
|
|
9507
|
+
* The location listener is set up before the root component gets created.
|
|
9508
|
+
* @type {?|undefined}
|
|
9509
|
+
*/
|
|
9510
|
+
ExtraOptions.prototype.initialNavigation;
|
|
9511
|
+
/**
|
|
9512
|
+
* A custom error handler for failed navigations.
|
|
9513
|
+
* @type {?|undefined}
|
|
9514
|
+
*/
|
|
9515
|
+
ExtraOptions.prototype.errorHandler;
|
|
9516
|
+
/**
|
|
9517
|
+
* Configures a preloading strategy.
|
|
9518
|
+
* One of `PreloadAllModules` or `NoPreloading` (the default).
|
|
9519
|
+
* @type {?|undefined}
|
|
9520
|
+
*/
|
|
9521
|
+
ExtraOptions.prototype.preloadingStrategy;
|
|
9522
|
+
/**
|
|
9523
|
+
* Define what the router should do if it receives a navigation request to the current URL.
|
|
9524
|
+
* Default is `ignore`, which causes the router ignores the navigation.
|
|
9525
|
+
* This can disable features such as a "refresh" button.
|
|
9526
|
+
* Use this option to configure the behavior when navigating to the
|
|
9527
|
+
* current URL. Default is 'ignore'.
|
|
9528
|
+
* @type {?|undefined}
|
|
9529
|
+
*/
|
|
9530
|
+
ExtraOptions.prototype.onSameUrlNavigation;
|
|
9531
|
+
/**
|
|
9532
|
+
* Configures if the scroll position needs to be restored when navigating back.
|
|
9533
|
+
*
|
|
9534
|
+
* * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.
|
|
9535
|
+
* * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.
|
|
9536
|
+
* * 'enabled'- Restores the previous scroll position on backward navigation, else sets the
|
|
9537
|
+
* position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward
|
|
9538
|
+
* navigation). This option will be the default in the future.
|
|
9539
|
+
*
|
|
9540
|
+
* You can implement custom scroll restoration behavior by adapting the enabled behavior as
|
|
9541
|
+
* in the following example.
|
|
9542
|
+
*
|
|
9543
|
+
* ```typescript
|
|
9544
|
+
* class AppModule {
|
|
9545
|
+
* constructor(router: Router, viewportScroller: ViewportScroller) {
|
|
9546
|
+
* router.events.pipe(
|
|
9547
|
+
* filter((e: Event): e is Scroll => e instanceof Scroll)
|
|
9548
|
+
* ).subscribe(e => {
|
|
9549
|
+
* if (e.position) {
|
|
9550
|
+
* // backward navigation
|
|
9551
|
+
* viewportScroller.scrollToPosition(e.position);
|
|
9552
|
+
* } else if (e.anchor) {
|
|
9553
|
+
* // anchor navigation
|
|
9554
|
+
* viewportScroller.scrollToAnchor(e.anchor);
|
|
9555
|
+
* } else {
|
|
9556
|
+
* // forward navigation
|
|
9557
|
+
* viewportScroller.scrollToPosition([0, 0]);
|
|
9558
|
+
* }
|
|
9559
|
+
* });
|
|
9560
|
+
* }
|
|
9561
|
+
* }
|
|
9562
|
+
* ```
|
|
9563
|
+
* @type {?|undefined}
|
|
9564
|
+
*/
|
|
9565
|
+
ExtraOptions.prototype.scrollPositionRestoration;
|
|
9566
|
+
/**
|
|
9567
|
+
* When set to 'enabled', scrolls to the anchor element when the URL has a fragment.
|
|
9568
|
+
* Anchor scrolling is disabled by default.
|
|
9569
|
+
*
|
|
9570
|
+
* Anchor scrolling does not happen on 'popstate'. Instead, we restore the position
|
|
9571
|
+
* that we stored or scroll to the top.
|
|
9572
|
+
* @type {?|undefined}
|
|
9573
|
+
*/
|
|
9574
|
+
ExtraOptions.prototype.anchorScrolling;
|
|
9575
|
+
/**
|
|
9576
|
+
* Configures the scroll offset the router will use when scrolling to an element.
|
|
9577
|
+
*
|
|
9578
|
+
* When given a tuple with x and y position value,
|
|
9579
|
+
* the router uses that offset each time it scrolls.
|
|
9580
|
+
* When given a function, the router invokes the function every time
|
|
9581
|
+
* it restores scroll position.
|
|
9582
|
+
* @type {?|undefined}
|
|
9583
|
+
*/
|
|
9584
|
+
ExtraOptions.prototype.scrollOffset;
|
|
9585
|
+
/**
|
|
9586
|
+
* Defines how the router merges parameters, data, and resolved data from parent to child
|
|
9587
|
+
* routes. By default ('emptyOnly'), inherits parent parameters only for
|
|
9588
|
+
* path-less or component-less routes.
|
|
9589
|
+
* Set to 'always' to enable unconditional inheritance of parent parameters.
|
|
9590
|
+
* @type {?|undefined}
|
|
9591
|
+
*/
|
|
9592
|
+
ExtraOptions.prototype.paramsInheritanceStrategy;
|
|
9593
|
+
/**
|
|
9594
|
+
* A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains
|
|
9595
|
+
* invalid character sequences.
|
|
9596
|
+
* The default implementation is to redirect to the root URL, dropping
|
|
9597
|
+
* any path or parameter information. The function takes three parameters:
|
|
9598
|
+
*
|
|
9599
|
+
* - `'URIError'` - Error thrown when parsing a bad URL.
|
|
9600
|
+
* - `'UrlSerializer'` - UrlSerializer that’s configured with the router.
|
|
9601
|
+
* - `'url'` - The malformed URL that caused the URIError
|
|
9602
|
+
*
|
|
9603
|
+
* @type {?|undefined}
|
|
9604
|
+
*/
|
|
9605
|
+
ExtraOptions.prototype.malformedUriErrorHandler;
|
|
9606
|
+
/**
|
|
9607
|
+
* Defines when the router updates the browser URL. By default ('deferred'),
|
|
9608
|
+
* update after successful navigation.
|
|
9609
|
+
* Set to 'eager' if prefer to update the URL at the beginning of navigation.
|
|
9610
|
+
* Updating the URL early allows you to handle a failure of navigation by
|
|
9611
|
+
* showing an error message with the URL that failed.
|
|
9612
|
+
* @type {?|undefined}
|
|
9613
|
+
*/
|
|
9614
|
+
ExtraOptions.prototype.urlUpdateStrategy;
|
|
9615
|
+
/**
|
|
9616
|
+
* Enables a bug fix that corrects relative link resolution in components with empty paths.
|
|
9617
|
+
* Example:
|
|
9618
|
+
*
|
|
9619
|
+
* ```
|
|
9620
|
+
* const routes = [
|
|
9621
|
+
* {
|
|
9622
|
+
* path: '',
|
|
9623
|
+
* component: ContainerComponent,
|
|
9624
|
+
* children: [
|
|
9625
|
+
* { path: 'a', component: AComponent },
|
|
9626
|
+
* { path: 'b', component: BComponent },
|
|
9627
|
+
* ]
|
|
9628
|
+
* }
|
|
9629
|
+
* ];
|
|
9630
|
+
* ```
|
|
9631
|
+
*
|
|
9632
|
+
* From the `ContainerComponent`, this will not work:
|
|
9633
|
+
*
|
|
9634
|
+
* `<a [routerLink]="['./a']">Link to A</a>`
|
|
9635
|
+
*
|
|
9636
|
+
* However, this will work:
|
|
9637
|
+
*
|
|
9638
|
+
* `<a [routerLink]="['../a']">Link to A</a>`
|
|
9639
|
+
*
|
|
9640
|
+
* In other words, you're required to use `../` rather than `./`. This is currently the default
|
|
9641
|
+
* behavior. Setting this option to `corrected` enables the fix.
|
|
9642
|
+
* @type {?|undefined}
|
|
9643
|
+
*/
|
|
9644
|
+
ExtraOptions.prototype.relativeLinkResolution;
|
|
9645
|
+
}
|
|
7793
9646
|
/**
|
|
7794
9647
|
* @param {?} ref
|
|
7795
9648
|
* @param {?} urlSerializer
|
|
@@ -7982,6 +9835,23 @@ RouterInitializer.decorators = [
|
|
|
7982
9835
|
RouterInitializer.ctorParameters = () => [
|
|
7983
9836
|
{ type: Injector }
|
|
7984
9837
|
];
|
|
9838
|
+
if (false) {
|
|
9839
|
+
/**
|
|
9840
|
+
* @type {?}
|
|
9841
|
+
* @private
|
|
9842
|
+
*/
|
|
9843
|
+
RouterInitializer.prototype.initNavigation;
|
|
9844
|
+
/**
|
|
9845
|
+
* @type {?}
|
|
9846
|
+
* @private
|
|
9847
|
+
*/
|
|
9848
|
+
RouterInitializer.prototype.resultOfPreactivationDone;
|
|
9849
|
+
/**
|
|
9850
|
+
* @type {?}
|
|
9851
|
+
* @private
|
|
9852
|
+
*/
|
|
9853
|
+
RouterInitializer.prototype.injector;
|
|
9854
|
+
}
|
|
7985
9855
|
/**
|
|
7986
9856
|
* @param {?} r
|
|
7987
9857
|
* @return {?}
|
|
@@ -8029,7 +9899,7 @@ function provideRouterInitializer() {
|
|
|
8029
9899
|
* \@publicApi
|
|
8030
9900
|
* @type {?}
|
|
8031
9901
|
*/
|
|
8032
|
-
const VERSION = new Version('8.2.
|
|
9902
|
+
const VERSION = new Version('8.2.5');
|
|
8033
9903
|
|
|
8034
9904
|
/**
|
|
8035
9905
|
* @fileoverview added by tsickle
|