@angular/router 6.0.3 → 6.0.7

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.
Files changed (84) hide show
  1. package/bundles/router-testing.umd.js +21 -15
  2. package/bundles/router-testing.umd.js.map +1 -1
  3. package/bundles/router-testing.umd.min.js +2 -2
  4. package/bundles/router-testing.umd.min.js.map +1 -1
  5. package/bundles/router-upgrade.umd.js +10 -1
  6. package/bundles/router-upgrade.umd.js.map +1 -1
  7. package/bundles/router-upgrade.umd.min.js +1 -1
  8. package/bundles/router-upgrade.umd.min.js.map +1 -1
  9. package/bundles/router.umd.js +348 -706
  10. package/bundles/router.umd.js.map +1 -1
  11. package/bundles/router.umd.min.js +18 -18
  12. package/bundles/router.umd.min.js.map +1 -1
  13. package/esm2015/index.js +2 -2
  14. package/esm2015/public_api.js +2 -2
  15. package/esm2015/src/components/empty_outlet.js +28 -0
  16. package/esm2015/src/config.js +13 -6
  17. package/esm2015/src/directives/router_link.js +29 -47
  18. package/esm2015/src/directives/router_link_active.js +9 -18
  19. package/esm2015/src/directives/router_outlet.js +8 -17
  20. package/esm2015/src/index.js +2 -2
  21. package/esm2015/src/private_export.js +2 -1
  22. package/esm2015/src/router.js +4 -4
  23. package/esm2015/src/router_config_loader.js +3 -3
  24. package/esm2015/src/router_module.js +11 -22
  25. package/esm2015/src/router_preloader.js +6 -13
  26. package/esm2015/src/version.js +1 -1
  27. package/esm2015/testing/src/router_testing_module.js +2 -20
  28. package/esm5/index.js +5 -1
  29. package/esm5/public_api.js +6 -1
  30. package/esm5/src/apply_redirects.js +14 -26
  31. package/esm5/src/components/empty_outlet.js +28 -0
  32. package/esm5/src/config.js +15 -6
  33. package/esm5/src/create_router_state.js +1 -1
  34. package/esm5/src/create_url_tree.js +2 -4
  35. package/esm5/src/directives/router_link.js +33 -33
  36. package/esm5/src/directives/router_link_active.js +9 -9
  37. package/esm5/src/directives/router_outlet.js +10 -22
  38. package/esm5/src/events.js +86 -340
  39. package/esm5/src/index.js +1 -1
  40. package/esm5/src/interfaces.js +1 -1
  41. package/esm5/src/pre_activation.js +12 -68
  42. package/esm5/src/private_export.js +2 -1
  43. package/esm5/src/recognize.js +5 -5
  44. package/esm5/src/route_reuse_strategy.js +3 -23
  45. package/esm5/src/router.js +49 -311
  46. package/esm5/src/router_config_loader.js +5 -4
  47. package/esm5/src/router_module.js +15 -44
  48. package/esm5/src/router_outlet_context.js +6 -46
  49. package/esm5/src/router_preloader.js +10 -71
  50. package/esm5/src/router_state.js +49 -231
  51. package/esm5/src/shared.js +1 -1
  52. package/esm5/src/url_handling_strategy.js +3 -23
  53. package/esm5/src/url_tree.js +33 -239
  54. package/esm5/src/utils/collection.js +1 -1
  55. package/esm5/src/utils/tree.js +6 -36
  56. package/esm5/src/version.js +7 -2
  57. package/esm5/testing/index.js +5 -1
  58. package/esm5/testing/public_api.js +6 -1
  59. package/esm5/testing/src/router_testing_module.js +7 -15
  60. package/esm5/testing/src/testing.js +6 -1
  61. package/esm5/upgrade/index.js +5 -1
  62. package/esm5/upgrade/public_api.js +6 -1
  63. package/esm5/upgrade/src/upgrade.js +1 -1
  64. package/fesm2015/router.js +100 -64
  65. package/fesm2015/router.js.map +1 -1
  66. package/fesm2015/testing.js +2 -4
  67. package/fesm2015/testing.js.map +1 -1
  68. package/fesm2015/upgrade.js +1 -1
  69. package/fesm2015/upgrade.js.map +1 -1
  70. package/fesm5/router.js +349 -708
  71. package/fesm5/router.js.map +1 -1
  72. package/fesm5/testing.js +21 -15
  73. package/fesm5/testing.js.map +1 -1
  74. package/fesm5/upgrade.js +10 -1
  75. package/fesm5/upgrade.js.map +1 -1
  76. package/package.json +4 -4
  77. package/router.metadata.json +1 -1
  78. package/src/components/empty_outlet.d.ts +11 -0
  79. package/src/config.d.ts +4 -1
  80. package/src/private_export.d.ts +1 -0
  81. package/testing.d.ts +0 -5
  82. package/testing.metadata.json +1 -1
  83. package/upgrade.d.ts +0 -5
  84. package/upgrade.metadata.json +1 -1
package/fesm5/router.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v6.0.3
2
+ * @license Angular v6.0.7
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import { APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation } from '@angular/common';
8
- import { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Attribute, ChangeDetectorRef, Compiler, ComponentFactoryResolver, ContentChildren, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Inject, Injectable, InjectionToken, Injector, Input, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, Optional, Output, Renderer2, SkipSelf, SystemJsNgModuleLoader, Version, ViewContainerRef, isDevMode, ɵisObservable, ɵisPromise } from '@angular/core';
8
+ import { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Attribute, ChangeDetectorRef, Compiler, Component, ComponentFactoryResolver, ContentChildren, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Inject, Injectable, InjectionToken, Injector, Input, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, Optional, Output, Renderer2, SkipSelf, SystemJsNgModuleLoader, Version, ViewContainerRef, isDevMode, ɵisObservable, ɵisPromise } from '@angular/core';
9
9
  import { __assign, __extends, __spread, __values } from 'tslib';
10
10
  import { BehaviorSubject, EmptyError, Observable, Subject, from, of } from 'rxjs';
11
11
  import { catchError, concatAll, concatMap, every, filter, first, last, map, mergeAll, mergeMap, reduce } from 'rxjs/operators';
@@ -39,8 +39,10 @@ import { ɵgetDOM } from '@angular/platform-browser';
39
39
  * @experimental
40
40
  */
41
41
  var RouterEvent = /** @class */ (function () {
42
- function RouterEvent(/** @docsNotRequired */
43
- id, /** @docsNotRequired */
42
+ function RouterEvent(
43
+ /** @docsNotRequired */
44
+ id,
45
+ /** @docsNotRequired */
44
46
  url) {
45
47
  this.id = id;
46
48
  this.url = url;
@@ -56,13 +58,13 @@ var RouterEvent = /** @class */ (function () {
56
58
  */
57
59
  var NavigationStart = /** @class */ (function (_super) {
58
60
  __extends(NavigationStart, _super);
59
- function NavigationStart(/** @docsNotRequired */
61
+ function NavigationStart(
60
62
  /** @docsNotRequired */
61
- id, /** @docsNotRequired */
63
+ id,
62
64
  /** @docsNotRequired */
63
- url, /** @docsNotRequired */
65
+ url,
64
66
  /** @docsNotRequired */
65
- navigationTrigger, /** @docsNotRequired */
67
+ navigationTrigger,
66
68
  /** @docsNotRequired */
67
69
  restoredState) {
68
70
  /** @docsNotRequired */
@@ -75,9 +77,7 @@ var NavigationStart = /** @class */ (function (_super) {
75
77
  return _this;
76
78
  }
77
79
  /** @docsNotRequired */
78
- /** @docsNotRequired */
79
- NavigationStart.prototype.toString = /** @docsNotRequired */
80
- function () { return "NavigationStart(id: " + this.id + ", url: '" + this.url + "')"; };
80
+ NavigationStart.prototype.toString = function () { return "NavigationStart(id: " + this.id + ", url: '" + this.url + "')"; };
81
81
  return NavigationStart;
82
82
  }(RouterEvent));
83
83
  /**
@@ -89,20 +89,19 @@ var NavigationStart = /** @class */ (function (_super) {
89
89
  */
90
90
  var NavigationEnd = /** @class */ (function (_super) {
91
91
  __extends(NavigationEnd, _super);
92
- function NavigationEnd(/** @docsNotRequired */
92
+ function NavigationEnd(
93
+ /** @docsNotRequired */
94
+ id,
93
95
  /** @docsNotRequired */
94
- id, /** @docsNotRequired */
96
+ url,
95
97
  /** @docsNotRequired */
96
- url, /** @docsNotRequired */
97
98
  urlAfterRedirects) {
98
99
  var _this = _super.call(this, id, url) || this;
99
100
  _this.urlAfterRedirects = urlAfterRedirects;
100
101
  return _this;
101
102
  }
102
103
  /** @docsNotRequired */
103
- /** @docsNotRequired */
104
- NavigationEnd.prototype.toString = /** @docsNotRequired */
105
- function () {
104
+ NavigationEnd.prototype.toString = function () {
106
105
  return "NavigationEnd(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "')";
107
106
  };
108
107
  return NavigationEnd;
@@ -116,20 +115,19 @@ var NavigationEnd = /** @class */ (function (_super) {
116
115
  */
117
116
  var NavigationCancel = /** @class */ (function (_super) {
118
117
  __extends(NavigationCancel, _super);
119
- function NavigationCancel(/** @docsNotRequired */
118
+ function NavigationCancel(
119
+ /** @docsNotRequired */
120
+ id,
120
121
  /** @docsNotRequired */
121
- id, /** @docsNotRequired */
122
+ url,
122
123
  /** @docsNotRequired */
123
- url, /** @docsNotRequired */
124
124
  reason) {
125
125
  var _this = _super.call(this, id, url) || this;
126
126
  _this.reason = reason;
127
127
  return _this;
128
128
  }
129
129
  /** @docsNotRequired */
130
- /** @docsNotRequired */
131
- NavigationCancel.prototype.toString = /** @docsNotRequired */
132
- function () { return "NavigationCancel(id: " + this.id + ", url: '" + this.url + "')"; };
130
+ NavigationCancel.prototype.toString = function () { return "NavigationCancel(id: " + this.id + ", url: '" + this.url + "')"; };
133
131
  return NavigationCancel;
134
132
  }(RouterEvent));
135
133
  /**
@@ -141,20 +139,19 @@ var NavigationCancel = /** @class */ (function (_super) {
141
139
  */
142
140
  var NavigationError = /** @class */ (function (_super) {
143
141
  __extends(NavigationError, _super);
144
- function NavigationError(/** @docsNotRequired */
142
+ function NavigationError(
143
+ /** @docsNotRequired */
144
+ id,
145
145
  /** @docsNotRequired */
146
- id, /** @docsNotRequired */
146
+ url,
147
147
  /** @docsNotRequired */
148
- url, /** @docsNotRequired */
149
148
  error) {
150
149
  var _this = _super.call(this, id, url) || this;
151
150
  _this.error = error;
152
151
  return _this;
153
152
  }
154
153
  /** @docsNotRequired */
155
- /** @docsNotRequired */
156
- NavigationError.prototype.toString = /** @docsNotRequired */
157
- function () {
154
+ NavigationError.prototype.toString = function () {
158
155
  return "NavigationError(id: " + this.id + ", url: '" + this.url + "', error: " + this.error + ")";
159
156
  };
160
157
  return NavigationError;
@@ -168,12 +165,14 @@ var NavigationError = /** @class */ (function (_super) {
168
165
  */
169
166
  var RoutesRecognized = /** @class */ (function (_super) {
170
167
  __extends(RoutesRecognized, _super);
171
- function RoutesRecognized(/** @docsNotRequired */
168
+ function RoutesRecognized(
169
+ /** @docsNotRequired */
170
+ id,
172
171
  /** @docsNotRequired */
173
- id, /** @docsNotRequired */
172
+ url,
173
+ /** @docsNotRequired */
174
+ urlAfterRedirects,
174
175
  /** @docsNotRequired */
175
- url, /** @docsNotRequired */
176
- urlAfterRedirects, /** @docsNotRequired */
177
176
  state) {
178
177
  var _this = _super.call(this, id, url) || this;
179
178
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -181,9 +180,7 @@ var RoutesRecognized = /** @class */ (function (_super) {
181
180
  return _this;
182
181
  }
183
182
  /** @docsNotRequired */
184
- /** @docsNotRequired */
185
- RoutesRecognized.prototype.toString = /** @docsNotRequired */
186
- function () {
183
+ RoutesRecognized.prototype.toString = function () {
187
184
  return "RoutesRecognized(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "', state: " + this.state + ")";
188
185
  };
189
186
  return RoutesRecognized;
@@ -197,12 +194,14 @@ var RoutesRecognized = /** @class */ (function (_super) {
197
194
  */
198
195
  var GuardsCheckStart = /** @class */ (function (_super) {
199
196
  __extends(GuardsCheckStart, _super);
200
- function GuardsCheckStart(/** @docsNotRequired */
197
+ function GuardsCheckStart(
201
198
  /** @docsNotRequired */
202
- id, /** @docsNotRequired */
199
+ id,
200
+ /** @docsNotRequired */
201
+ url,
202
+ /** @docsNotRequired */
203
+ urlAfterRedirects,
203
204
  /** @docsNotRequired */
204
- url, /** @docsNotRequired */
205
- urlAfterRedirects, /** @docsNotRequired */
206
205
  state) {
207
206
  var _this = _super.call(this, id, url) || this;
208
207
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -223,13 +222,16 @@ var GuardsCheckStart = /** @class */ (function (_super) {
223
222
  */
224
223
  var GuardsCheckEnd = /** @class */ (function (_super) {
225
224
  __extends(GuardsCheckEnd, _super);
226
- function GuardsCheckEnd(/** @docsNotRequired */
225
+ function GuardsCheckEnd(
226
+ /** @docsNotRequired */
227
+ id,
227
228
  /** @docsNotRequired */
228
- id, /** @docsNotRequired */
229
+ url,
230
+ /** @docsNotRequired */
231
+ urlAfterRedirects,
232
+ /** @docsNotRequired */
233
+ state,
229
234
  /** @docsNotRequired */
230
- url, /** @docsNotRequired */
231
- urlAfterRedirects, /** @docsNotRequired */
232
- state, /** @docsNotRequired */
233
235
  shouldActivate) {
234
236
  var _this = _super.call(this, id, url) || this;
235
237
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -254,12 +256,14 @@ var GuardsCheckEnd = /** @class */ (function (_super) {
254
256
  */
255
257
  var ResolveStart = /** @class */ (function (_super) {
256
258
  __extends(ResolveStart, _super);
257
- function ResolveStart(/** @docsNotRequired */
259
+ function ResolveStart(
260
+ /** @docsNotRequired */
261
+ id,
262
+ /** @docsNotRequired */
263
+ url,
258
264
  /** @docsNotRequired */
259
- id, /** @docsNotRequired */
265
+ urlAfterRedirects,
260
266
  /** @docsNotRequired */
261
- url, /** @docsNotRequired */
262
- urlAfterRedirects, /** @docsNotRequired */
263
267
  state) {
264
268
  var _this = _super.call(this, id, url) || this;
265
269
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -281,12 +285,14 @@ var ResolveStart = /** @class */ (function (_super) {
281
285
  */
282
286
  var ResolveEnd = /** @class */ (function (_super) {
283
287
  __extends(ResolveEnd, _super);
284
- function ResolveEnd(/** @docsNotRequired */
288
+ function ResolveEnd(
285
289
  /** @docsNotRequired */
286
- id, /** @docsNotRequired */
290
+ id,
291
+ /** @docsNotRequired */
292
+ url,
293
+ /** @docsNotRequired */
294
+ urlAfterRedirects,
287
295
  /** @docsNotRequired */
288
- url, /** @docsNotRequired */
289
- urlAfterRedirects, /** @docsNotRequired */
290
296
  state) {
291
297
  var _this = _super.call(this, id, url) || this;
292
298
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -306,7 +312,8 @@ var ResolveEnd = /** @class */ (function (_super) {
306
312
  * @experimental
307
313
  */
308
314
  var RouteConfigLoadStart = /** @class */ (function () {
309
- function RouteConfigLoadStart(/** @docsNotRequired */
315
+ function RouteConfigLoadStart(
316
+ /** @docsNotRequired */
310
317
  route) {
311
318
  this.route = route;
312
319
  }
@@ -321,7 +328,8 @@ var RouteConfigLoadStart = /** @class */ (function () {
321
328
  * @experimental
322
329
  */
323
330
  var RouteConfigLoadEnd = /** @class */ (function () {
324
- function RouteConfigLoadEnd(/** @docsNotRequired */
331
+ function RouteConfigLoadEnd(
332
+ /** @docsNotRequired */
325
333
  route) {
326
334
  this.route = route;
327
335
  }
@@ -337,7 +345,8 @@ var RouteConfigLoadEnd = /** @class */ (function () {
337
345
  * @experimental
338
346
  */
339
347
  var ChildActivationStart = /** @class */ (function () {
340
- function ChildActivationStart(/** @docsNotRequired */
348
+ function ChildActivationStart(
349
+ /** @docsNotRequired */
341
350
  snapshot) {
342
351
  this.snapshot = snapshot;
343
352
  }
@@ -356,7 +365,8 @@ var ChildActivationStart = /** @class */ (function () {
356
365
  * @experimental
357
366
  */
358
367
  var ChildActivationEnd = /** @class */ (function () {
359
- function ChildActivationEnd(/** @docsNotRequired */
368
+ function ChildActivationEnd(
369
+ /** @docsNotRequired */
360
370
  snapshot) {
361
371
  this.snapshot = snapshot;
362
372
  }
@@ -375,7 +385,8 @@ var ChildActivationEnd = /** @class */ (function () {
375
385
  * @experimental
376
386
  */
377
387
  var ActivationStart = /** @class */ (function () {
378
- function ActivationStart(/** @docsNotRequired */
388
+ function ActivationStart(
389
+ /** @docsNotRequired */
379
390
  snapshot) {
380
391
  this.snapshot = snapshot;
381
392
  }
@@ -394,7 +405,8 @@ var ActivationStart = /** @class */ (function () {
394
405
  * @experimental
395
406
  */
396
407
  var ActivationEnd = /** @class */ (function () {
397
- function ActivationEnd(/** @docsNotRequired */
408
+ function ActivationEnd(
409
+ /** @docsNotRequired */
398
410
  snapshot) {
399
411
  this.snapshot = snapshot;
400
412
  }
@@ -405,6 +417,31 @@ var ActivationEnd = /** @class */ (function () {
405
417
  return ActivationEnd;
406
418
  }());
407
419
 
420
+ /**
421
+ * @license
422
+ * Copyright Google Inc. All Rights Reserved.
423
+ *
424
+ * Use of this source code is governed by an MIT-style license that can be
425
+ * found in the LICENSE file at https://angular.io/license
426
+ */
427
+ /**
428
+ * This component is used internally within the router to be a placeholder when an empty
429
+ * router-outlet is needed. For example, with a config such as:
430
+ *
431
+ * `{path: 'parent', outlet: 'nav', children: [...]}`
432
+ *
433
+ * In order to render, there needs to be a component on this config, which will default
434
+ * to this `EmptyOutletComponent`.
435
+ */
436
+ var EmptyOutletComponent = /** @class */ (function () {
437
+ function EmptyOutletComponent() {
438
+ }
439
+ EmptyOutletComponent.decorators = [
440
+ { type: Component, args: [{ template: "<router-outlet></router-outlet>" }] }
441
+ ];
442
+ return EmptyOutletComponent;
443
+ }());
444
+
408
445
  /**
409
446
  * @license
410
447
  * Copyright Google Inc. All Rights Reserved.
@@ -522,8 +559,9 @@ function validateNode(route, fullPath) {
522
559
  if (Array.isArray(route)) {
523
560
  throw new Error("Invalid configuration of route '" + fullPath + "': Array cannot be specified");
524
561
  }
525
- if (!route.component && (route.outlet && route.outlet !== PRIMARY_OUTLET)) {
526
- throw new Error("Invalid configuration of route '" + fullPath + "': a componentless route cannot have a named outlet set");
562
+ if (!route.component && !route.children && !route.loadChildren &&
563
+ (route.outlet && route.outlet !== PRIMARY_OUTLET)) {
564
+ throw new Error("Invalid configuration of route '" + fullPath + "': a componentless route without children or loadChildren cannot have a named outlet set");
527
565
  }
528
566
  if (route.redirectTo && route.children) {
529
567
  throw new Error("Invalid configuration of route '" + fullPath + "': redirectTo and children cannot be used together");
@@ -577,9 +615,16 @@ function getFullPath(parentPath, currentRoute) {
577
615
  return parentPath + "/" + currentRoute.path;
578
616
  }
579
617
  }
580
- function copyConfig(r) {
581
- var children = r.children && r.children.map(copyConfig);
582
- return children ? __assign({}, r, { children: children }) : __assign({}, r);
618
+ /**
619
+ * Makes a copy of the config and adds any default required properties.
620
+ */
621
+ function standardizeConfig(r) {
622
+ var children = r.children && r.children.map(standardizeConfig);
623
+ var c = children ? __assign({}, r, { children: children }) : __assign({}, r);
624
+ if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {
625
+ c.component = EmptyOutletComponent;
626
+ }
627
+ return c;
583
628
  }
584
629
 
585
630
  /**
@@ -777,9 +822,12 @@ function containsSegmentGroupHelper(container, containee, containeePaths) {
777
822
  */
778
823
  var UrlTree = /** @class */ (function () {
779
824
  /** @internal */
780
- function UrlTree(/** The root segment group of the URL tree */
781
- root, /** The query params of the URL */
782
- queryParams, /** The fragment of the URL */
825
+ function UrlTree(
826
+ /** The root segment group of the URL tree */
827
+ root,
828
+ /** The query params of the URL */
829
+ queryParams,
830
+ /** The fragment of the URL */
783
831
  fragment) {
784
832
  this.root = root;
785
833
  this.queryParams = queryParams;
@@ -796,9 +844,7 @@ var UrlTree = /** @class */ (function () {
796
844
  configurable: true
797
845
  });
798
846
  /** @docsNotRequired */
799
- /** @docsNotRequired */
800
- UrlTree.prototype.toString = /** @docsNotRequired */
801
- function () { return DEFAULT_SERIALIZER.serialize(this); };
847
+ UrlTree.prototype.toString = function () { return DEFAULT_SERIALIZER.serialize(this); };
802
848
  return UrlTree;
803
849
  }());
804
850
  /**
@@ -811,8 +857,10 @@ var UrlTree = /** @class */ (function () {
811
857
  *
812
858
  */
813
859
  var UrlSegmentGroup = /** @class */ (function () {
814
- function UrlSegmentGroup(/** The URL segments of this group. See `UrlSegment` for more information */
815
- segments, /** The list of children of this group */
860
+ function UrlSegmentGroup(
861
+ /** The URL segments of this group. See `UrlSegment` for more information */
862
+ segments,
863
+ /** The list of children of this group */
816
864
  children) {
817
865
  var _this = this;
818
866
  this.segments = segments;
@@ -822,20 +870,15 @@ var UrlSegmentGroup = /** @class */ (function () {
822
870
  forEach(children, function (v, k) { return v.parent = _this; });
823
871
  }
824
872
  /** Whether the segment has child segments */
825
- /** Whether the segment has child segments */
826
- UrlSegmentGroup.prototype.hasChildren = /** Whether the segment has child segments */
827
- function () { return this.numberOfChildren > 0; };
873
+ UrlSegmentGroup.prototype.hasChildren = function () { return this.numberOfChildren > 0; };
828
874
  Object.defineProperty(UrlSegmentGroup.prototype, "numberOfChildren", {
829
875
  /** Number of child segments */
830
- get: /** Number of child segments */
831
- function () { return Object.keys(this.children).length; },
876
+ get: function () { return Object.keys(this.children).length; },
832
877
  enumerable: true,
833
878
  configurable: true
834
879
  });
835
880
  /** @docsNotRequired */
836
- /** @docsNotRequired */
837
- UrlSegmentGroup.prototype.toString = /** @docsNotRequired */
838
- function () { return serializePaths(this); };
881
+ UrlSegmentGroup.prototype.toString = function () { return serializePaths(this); };
839
882
  return UrlSegmentGroup;
840
883
  }());
841
884
  /**
@@ -864,8 +907,10 @@ var UrlSegmentGroup = /** @class */ (function () {
864
907
  *
865
908
  */
866
909
  var UrlSegment = /** @class */ (function () {
867
- function UrlSegment(/** The path part of a URL segment */
868
- path, /** The matrix parameters associated with a segment */
910
+ function UrlSegment(
911
+ /** The path part of a URL segment */
912
+ path,
913
+ /** The matrix parameters associated with a segment */
869
914
  parameters) {
870
915
  this.path = path;
871
916
  this.parameters = parameters;
@@ -881,9 +926,7 @@ var UrlSegment = /** @class */ (function () {
881
926
  configurable: true
882
927
  });
883
928
  /** @docsNotRequired */
884
- /** @docsNotRequired */
885
- UrlSegment.prototype.toString = /** @docsNotRequired */
886
- function () { return serializePath(this); };
929
+ UrlSegment.prototype.toString = function () { return serializePath(this); };
887
930
  return UrlSegment;
888
931
  }());
889
932
  function equalSegments(as, bs) {
@@ -947,19 +990,15 @@ var DefaultUrlSerializer = /** @class */ (function () {
947
990
  function DefaultUrlSerializer() {
948
991
  }
949
992
  /** Parses a url into a `UrlTree` */
950
- /** Parses a url into a `UrlTree` */
951
- DefaultUrlSerializer.prototype.parse = /** Parses a url into a `UrlTree` */
952
- function (url) {
993
+ DefaultUrlSerializer.prototype.parse = function (url) {
953
994
  var p = new UrlParser(url);
954
995
  return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());
955
996
  };
956
997
  /** Converts a `UrlTree` into a url */
957
- /** Converts a `UrlTree` into a url */
958
- DefaultUrlSerializer.prototype.serialize = /** Converts a `UrlTree` into a url */
959
- function (tree) {
998
+ DefaultUrlSerializer.prototype.serialize = function (tree) {
960
999
  var segment = "/" + serializeSegment(tree.root, true);
961
1000
  var query = serializeQueryParams(tree.queryParams);
962
- var fragment = typeof tree.fragment === "string" ? "#" + encodeUriFragment((tree.fragment)) : '';
1001
+ var fragment = typeof tree.fragment === "string" ? "#" + encodeUriFragment(tree.fragment) : '';
963
1002
  return "" + segment + query + fragment;
964
1003
  };
965
1004
  return DefaultUrlSerializer;
@@ -1131,12 +1170,7 @@ var UrlParser = /** @class */ (function () {
1131
1170
  };
1132
1171
  // parse a segment with its matrix parameters
1133
1172
  // ie `name;k1=v1;k2`
1134
- // parse a segment with its matrix parameters
1135
- // ie `name;k1=v1;k2`
1136
- UrlParser.prototype.parseSegment =
1137
- // parse a segment with its matrix parameters
1138
- // ie `name;k1=v1;k2`
1139
- function () {
1173
+ UrlParser.prototype.parseSegment = function () {
1140
1174
  var path = matchSegments(this.remaining);
1141
1175
  if (path === '' && this.peekStartsWith(';')) {
1142
1176
  throw new Error("Empty path url segment cannot have parameters: '" + this.remaining + "'.");
@@ -1168,10 +1202,7 @@ var UrlParser = /** @class */ (function () {
1168
1202
  params[decode(key)] = decode(value);
1169
1203
  };
1170
1204
  // Parse a single query parameter `name[=value]`
1171
- // Parse a single query parameter `name[=value]`
1172
- UrlParser.prototype.parseQueryParam =
1173
- // Parse a single query parameter `name[=value]`
1174
- function (params) {
1205
+ UrlParser.prototype.parseQueryParam = function (params) {
1175
1206
  var key = matchQueryParams(this.remaining);
1176
1207
  if (!key) {
1177
1208
  return;
@@ -1202,10 +1233,7 @@ var UrlParser = /** @class */ (function () {
1202
1233
  }
1203
1234
  };
1204
1235
  // parse `(a/b//outlet_name:c/d)`
1205
- // parse `(a/b//outlet_name:c/d)`
1206
- UrlParser.prototype.parseParens =
1207
- // parse `(a/b//outlet_name:c/d)`
1208
- function (allowPrimary) {
1236
+ UrlParser.prototype.parseParens = function (allowPrimary) {
1209
1237
  var segments = {};
1210
1238
  this.capture('(');
1211
1239
  while (!this.consumeOptional(')') && this.remaining.length > 0) {
@@ -1216,7 +1244,7 @@ var UrlParser = /** @class */ (function () {
1216
1244
  if (next !== '/' && next !== ')' && next !== ';') {
1217
1245
  throw new Error("Cannot parse url '" + this.url + "'");
1218
1246
  }
1219
- var outletName = (undefined);
1247
+ var outletName = undefined;
1220
1248
  if (path.indexOf(':') > -1) {
1221
1249
  outletName = path.substr(0, path.indexOf(':'));
1222
1250
  this.capture(outletName);
@@ -1234,10 +1262,7 @@ var UrlParser = /** @class */ (function () {
1234
1262
  };
1235
1263
  UrlParser.prototype.peekStartsWith = function (str) { return this.remaining.startsWith(str); };
1236
1264
  // Consumes the prefix when it is present and returns whether it has been consumed
1237
- // Consumes the prefix when it is present and returns whether it has been consumed
1238
- UrlParser.prototype.consumeOptional =
1239
- // Consumes the prefix when it is present and returns whether it has been consumed
1240
- function (str) {
1265
+ UrlParser.prototype.consumeOptional = function (str) {
1241
1266
  if (this.peekStartsWith(str)) {
1242
1267
  this.remaining = this.remaining.substring(str.length);
1243
1268
  return true;
@@ -1278,14 +1303,10 @@ function absoluteRedirect(newTree) {
1278
1303
  return new Observable(function (obs) { return obs.error(new AbsoluteRedirect(newTree)); });
1279
1304
  }
1280
1305
  function namedOutletsRedirect(redirectTo) {
1281
- return new Observable(function (obs) {
1282
- return obs.error(new Error("Only absolute redirects can have named outlets. redirectTo: '" + redirectTo + "'"));
1283
- });
1306
+ return new Observable(function (obs) { return obs.error(new Error("Only absolute redirects can have named outlets. redirectTo: '" + redirectTo + "'")); });
1284
1307
  }
1285
1308
  function canLoadFails(route) {
1286
- return new Observable(function (obs) {
1287
- return obs.error(navigationCancelingError("Cannot load children because the guard of the route \"path: '" + route.path + "'\" returned false"));
1288
- });
1309
+ return new Observable(function (obs) { return obs.error(navigationCancelingError("Cannot load children because the guard of the route \"path: '" + route.path + "'\" returned false")); });
1289
1310
  }
1290
1311
  /**
1291
1312
  * Returns the `UrlTree` with the redirection applied.
@@ -1307,12 +1328,9 @@ var ApplyRedirects = /** @class */ (function () {
1307
1328
  ApplyRedirects.prototype.apply = function () {
1308
1329
  var _this = this;
1309
1330
  var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);
1310
- var urlTrees$ = expanded$.pipe(map(function (rootSegmentGroup) {
1311
- return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, (_this.urlTree.fragment));
1312
- }));
1331
+ var urlTrees$ = expanded$.pipe(map(function (rootSegmentGroup) { return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, _this.urlTree.fragment); }));
1313
1332
  return urlTrees$.pipe(catchError(function (e) {
1314
1333
  if (e instanceof AbsoluteRedirect) {
1315
- // after an absolute redirect we do not apply any more redirects!
1316
1334
  // after an absolute redirect we do not apply any more redirects!
1317
1335
  _this.allowRedirects = false;
1318
1336
  // we need to run matching, so we can fetch all lazy-loaded modules
@@ -1328,7 +1346,7 @@ var ApplyRedirects = /** @class */ (function () {
1328
1346
  var _this = this;
1329
1347
  var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);
1330
1348
  var mapped$ = expanded$.pipe(map(function (rootSegmentGroup) {
1331
- return _this.createUrlTree(rootSegmentGroup, tree.queryParams, (tree.fragment));
1349
+ return _this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment);
1332
1350
  }));
1333
1351
  return mapped$.pipe(catchError(function (e) {
1334
1352
  if (e instanceof NoMatch) {
@@ -1355,10 +1373,7 @@ var ApplyRedirects = /** @class */ (function () {
1355
1373
  return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);
1356
1374
  };
1357
1375
  // Recursively expand segment groups for all the child outlets
1358
- // Recursively expand segment groups for all the child outlets
1359
- ApplyRedirects.prototype.expandChildren =
1360
- // Recursively expand segment groups for all the child outlets
1361
- function (ngModule, routes, segmentGroup) {
1376
+ ApplyRedirects.prototype.expandChildren = function (ngModule, routes, segmentGroup) {
1362
1377
  var _this = this;
1363
1378
  return waitForMap(segmentGroup.children, function (childOutlet, child) { return _this.expandSegmentGroup(ngModule, routes, child, childOutlet); });
1364
1379
  };
@@ -1407,7 +1422,7 @@ var ApplyRedirects = /** @class */ (function () {
1407
1422
  };
1408
1423
  ApplyRedirects.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect = function (ngModule, routes, route, outlet) {
1409
1424
  var _this = this;
1410
- var newTree = this.applyRedirectCommands([], (route.redirectTo), {});
1425
+ var newTree = this.applyRedirectCommands([], route.redirectTo, {});
1411
1426
  if (route.redirectTo.startsWith('/')) {
1412
1427
  return absoluteRedirect(newTree);
1413
1428
  }
@@ -1421,7 +1436,7 @@ var ApplyRedirects = /** @class */ (function () {
1421
1436
  var _a = match(segmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild, positionalParamSegments = _a.positionalParamSegments;
1422
1437
  if (!matched)
1423
1438
  return noMatch(segmentGroup);
1424
- var newTree = this.applyRedirectCommands(consumedSegments, (route.redirectTo), positionalParamSegments);
1439
+ var newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);
1425
1440
  if (route.redirectTo.startsWith('/')) {
1426
1441
  return absoluteRedirect(newTree);
1427
1442
  }
@@ -1496,7 +1511,7 @@ var ApplyRedirects = /** @class */ (function () {
1496
1511
  return of(res);
1497
1512
  }
1498
1513
  if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {
1499
- return namedOutletsRedirect((route.redirectTo));
1514
+ return namedOutletsRedirect(route.redirectTo);
1500
1515
  }
1501
1516
  c = c.children[PRIMARY_OUTLET];
1502
1517
  }
@@ -1533,10 +1548,8 @@ var ApplyRedirects = /** @class */ (function () {
1533
1548
  };
1534
1549
  ApplyRedirects.prototype.createSegments = function (redirectTo, redirectToSegments, actualSegments, posParams) {
1535
1550
  var _this = this;
1536
- return redirectToSegments.map(function (s) {
1537
- return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :
1538
- _this.findOrReturn(s, actualSegments);
1539
- });
1551
+ return redirectToSegments.map(function (s) { return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :
1552
+ _this.findOrReturn(s, actualSegments); });
1540
1553
  };
1541
1554
  ApplyRedirects.prototype.findPosParam = function (redirectTo, redirectToUrlSegment, posParams) {
1542
1555
  var pos = posParams[redirectToUrlSegment.path.substring(1)];
@@ -1597,9 +1610,9 @@ function match(segmentGroup, route, segments) {
1597
1610
  }
1598
1611
  return {
1599
1612
  matched: true,
1600
- consumedSegments: (res.consumed),
1601
- lastChild: (res.consumed.length),
1602
- positionalParamSegments: (res.posParams),
1613
+ consumedSegments: res.consumed,
1614
+ lastChild: res.consumed.length,
1615
+ positionalParamSegments: res.posParams,
1603
1616
  };
1604
1617
  }
1605
1618
  function split(segmentGroup, consumedSegments, slicedSegments, config) {
@@ -1698,52 +1711,28 @@ var Tree = /** @class */ (function () {
1698
1711
  /**
1699
1712
  * @internal
1700
1713
  */
1701
- /**
1702
- * @internal
1703
- */
1704
- Tree.prototype.parent = /**
1705
- * @internal
1706
- */
1707
- function (t) {
1714
+ Tree.prototype.parent = function (t) {
1708
1715
  var p = this.pathFromRoot(t);
1709
1716
  return p.length > 1 ? p[p.length - 2] : null;
1710
1717
  };
1711
1718
  /**
1712
1719
  * @internal
1713
1720
  */
1714
- /**
1715
- * @internal
1716
- */
1717
- Tree.prototype.children = /**
1718
- * @internal
1719
- */
1720
- function (t) {
1721
+ Tree.prototype.children = function (t) {
1721
1722
  var n = findNode(t, this._root);
1722
1723
  return n ? n.children.map(function (t) { return t.value; }) : [];
1723
1724
  };
1724
1725
  /**
1725
1726
  * @internal
1726
1727
  */
1727
- /**
1728
- * @internal
1729
- */
1730
- Tree.prototype.firstChild = /**
1731
- * @internal
1732
- */
1733
- function (t) {
1728
+ Tree.prototype.firstChild = function (t) {
1734
1729
  var n = findNode(t, this._root);
1735
1730
  return n && n.children.length > 0 ? n.children[0].value : null;
1736
1731
  };
1737
1732
  /**
1738
1733
  * @internal
1739
1734
  */
1740
- /**
1741
- * @internal
1742
- */
1743
- Tree.prototype.siblings = /**
1744
- * @internal
1745
- */
1746
- function (t) {
1735
+ Tree.prototype.siblings = function (t) {
1747
1736
  var p = findPath(t, this._root);
1748
1737
  if (p.length < 2)
1749
1738
  return [];
@@ -1753,13 +1742,7 @@ var Tree = /** @class */ (function () {
1753
1742
  /**
1754
1743
  * @internal
1755
1744
  */
1756
- /**
1757
- * @internal
1758
- */
1759
- Tree.prototype.pathFromRoot = /**
1760
- * @internal
1761
- */
1762
- function (t) { return findPath(t, this._root).map(function (s) { return s.value; }); };
1745
+ Tree.prototype.pathFromRoot = function (t) { return findPath(t, this._root).map(function (s) { return s.value; }); };
1763
1746
  return Tree;
1764
1747
  }());
1765
1748
  // DFS for the node matching the value
@@ -1862,7 +1845,8 @@ function nodeChildrenAsMap(node) {
1862
1845
  var RouterState = /** @class */ (function (_super) {
1863
1846
  __extends(RouterState, _super);
1864
1847
  /** @internal */
1865
- function RouterState(root, /** The current snapshot of the router state */
1848
+ function RouterState(root,
1849
+ /** The current snapshot of the router state */
1866
1850
  snapshot) {
1867
1851
  var _this = _super.call(this, root) || this;
1868
1852
  _this.snapshot = snapshot;
@@ -1913,13 +1897,20 @@ function createEmptyStateSnapshot(urlTree, rootComponent) {
1913
1897
  */
1914
1898
  var ActivatedRoute = /** @class */ (function () {
1915
1899
  /** @internal */
1916
- function ActivatedRoute(/** An observable of the URL segments matched by this route */
1917
- url, /** An observable of the matrix parameters scoped to this route */
1918
- params, /** An observable of the query parameters shared by all the routes */
1919
- queryParams, /** An observable of the URL fragment shared by all the routes */
1920
- fragment, /** An observable of the static and resolved data of this route. */
1921
- data, /** The outlet name of the route. It's a constant */
1922
- outlet, /** The component of the route. It's a constant */
1900
+ function ActivatedRoute(
1901
+ /** An observable of the URL segments matched by this route */
1902
+ url,
1903
+ /** An observable of the matrix parameters scoped to this route */
1904
+ params,
1905
+ /** An observable of the query parameters shared by all the routes */
1906
+ queryParams,
1907
+ /** An observable of the URL fragment shared by all the routes */
1908
+ fragment,
1909
+ /** An observable of the static and resolved data of this route. */
1910
+ data,
1911
+ /** The outlet name of the route. It's a constant */
1912
+ outlet,
1913
+ /** The component of the route. It's a constant */
1923
1914
  // TODO(vsavkin): remove |string
1924
1915
  component, futureSnapshot) {
1925
1916
  this.url = url;
@@ -1933,43 +1924,37 @@ var ActivatedRoute = /** @class */ (function () {
1933
1924
  }
1934
1925
  Object.defineProperty(ActivatedRoute.prototype, "routeConfig", {
1935
1926
  /** The configuration used to match this route */
1936
- get: /** The configuration used to match this route */
1937
- function () { return this._futureSnapshot.routeConfig; },
1927
+ get: function () { return this._futureSnapshot.routeConfig; },
1938
1928
  enumerable: true,
1939
1929
  configurable: true
1940
1930
  });
1941
1931
  Object.defineProperty(ActivatedRoute.prototype, "root", {
1942
1932
  /** The root of the router state */
1943
- get: /** The root of the router state */
1944
- function () { return this._routerState.root; },
1933
+ get: function () { return this._routerState.root; },
1945
1934
  enumerable: true,
1946
1935
  configurable: true
1947
1936
  });
1948
1937
  Object.defineProperty(ActivatedRoute.prototype, "parent", {
1949
1938
  /** The parent of this route in the router state tree */
1950
- get: /** The parent of this route in the router state tree */
1951
- function () { return this._routerState.parent(this); },
1939
+ get: function () { return this._routerState.parent(this); },
1952
1940
  enumerable: true,
1953
1941
  configurable: true
1954
1942
  });
1955
1943
  Object.defineProperty(ActivatedRoute.prototype, "firstChild", {
1956
1944
  /** The first child of this route in the router state tree */
1957
- get: /** The first child of this route in the router state tree */
1958
- function () { return this._routerState.firstChild(this); },
1945
+ get: function () { return this._routerState.firstChild(this); },
1959
1946
  enumerable: true,
1960
1947
  configurable: true
1961
1948
  });
1962
1949
  Object.defineProperty(ActivatedRoute.prototype, "children", {
1963
1950
  /** The children of this route in the router state tree */
1964
- get: /** The children of this route in the router state tree */
1965
- function () { return this._routerState.children(this); },
1951
+ get: function () { return this._routerState.children(this); },
1966
1952
  enumerable: true,
1967
1953
  configurable: true
1968
1954
  });
1969
1955
  Object.defineProperty(ActivatedRoute.prototype, "pathFromRoot", {
1970
1956
  /** The path from the root of the router state tree to this route */
1971
- get: /** The path from the root of the router state tree to this route */
1972
- function () { return this._routerState.pathFromRoot(this); },
1957
+ get: function () { return this._routerState.pathFromRoot(this); },
1973
1958
  enumerable: true,
1974
1959
  configurable: true
1975
1960
  });
@@ -2059,13 +2044,20 @@ function flattenInherited(pathFromRoot) {
2059
2044
  */
2060
2045
  var ActivatedRouteSnapshot = /** @class */ (function () {
2061
2046
  /** @internal */
2062
- function ActivatedRouteSnapshot(/** The URL segments matched by this route */
2063
- url, /** The matrix parameters scoped to this route */
2064
- params, /** The query parameters shared by all the routes */
2065
- queryParams, /** The URL fragment shared by all the routes */
2066
- fragment, /** The static and resolved data of this route */
2067
- data, /** The outlet name of the route */
2068
- outlet, /** The component of the route */
2047
+ function ActivatedRouteSnapshot(
2048
+ /** The URL segments matched by this route */
2049
+ url,
2050
+ /** The matrix parameters scoped to this route */
2051
+ params,
2052
+ /** The query parameters shared by all the routes */
2053
+ queryParams,
2054
+ /** The URL fragment shared by all the routes */
2055
+ fragment,
2056
+ /** The static and resolved data of this route */
2057
+ data,
2058
+ /** The outlet name of the route */
2059
+ outlet,
2060
+ /** The component of the route */
2069
2061
  component, routeConfig, urlSegment, lastPathIndex, resolve) {
2070
2062
  this.url = url;
2071
2063
  this.params = params;
@@ -2081,36 +2073,31 @@ var ActivatedRouteSnapshot = /** @class */ (function () {
2081
2073
  }
2082
2074
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "root", {
2083
2075
  /** The root of the router state */
2084
- get: /** The root of the router state */
2085
- function () { return this._routerState.root; },
2076
+ get: function () { return this._routerState.root; },
2086
2077
  enumerable: true,
2087
2078
  configurable: true
2088
2079
  });
2089
2080
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "parent", {
2090
2081
  /** The parent of this route in the router state tree */
2091
- get: /** The parent of this route in the router state tree */
2092
- function () { return this._routerState.parent(this); },
2082
+ get: function () { return this._routerState.parent(this); },
2093
2083
  enumerable: true,
2094
2084
  configurable: true
2095
2085
  });
2096
2086
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "firstChild", {
2097
2087
  /** The first child of this route in the router state tree */
2098
- get: /** The first child of this route in the router state tree */
2099
- function () { return this._routerState.firstChild(this); },
2088
+ get: function () { return this._routerState.firstChild(this); },
2100
2089
  enumerable: true,
2101
2090
  configurable: true
2102
2091
  });
2103
2092
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "children", {
2104
2093
  /** The children of this route in the router state tree */
2105
- get: /** The children of this route in the router state tree */
2106
- function () { return this._routerState.children(this); },
2094
+ get: function () { return this._routerState.children(this); },
2107
2095
  enumerable: true,
2108
2096
  configurable: true
2109
2097
  });
2110
2098
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "pathFromRoot", {
2111
2099
  /** The path from the root of the router state tree to this route */
2112
- get: /** The path from the root of the router state tree to this route */
2113
- function () { return this._routerState.pathFromRoot(this); },
2100
+ get: function () { return this._routerState.pathFromRoot(this); },
2114
2101
  enumerable: true,
2115
2102
  configurable: true
2116
2103
  });
@@ -2170,7 +2157,8 @@ var ActivatedRouteSnapshot = /** @class */ (function () {
2170
2157
  var RouterStateSnapshot = /** @class */ (function (_super) {
2171
2158
  __extends(RouterStateSnapshot, _super);
2172
2159
  /** @internal */
2173
- function RouterStateSnapshot(/** The url from which this snapshot was created */
2160
+ function RouterStateSnapshot(
2161
+ /** The url from which this snapshot was created */
2174
2162
  url, root) {
2175
2163
  var _this = _super.call(this, root) || this;
2176
2164
  _this.url = url;
@@ -2217,7 +2205,6 @@ function advanceActivatedRoute(route) {
2217
2205
  else {
2218
2206
  route.snapshot = route._futureSnapshot;
2219
2207
  // this is for resolved data
2220
- // this is for resolved data
2221
2208
  route.data.next(route._futureSnapshot.data);
2222
2209
  }
2223
2210
  }
@@ -2225,7 +2212,7 @@ function equalParamsAndUrlSegments(a, b) {
2225
2212
  var equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);
2226
2213
  var parentsMismatch = !a.parent !== !b.parent;
2227
2214
  return equalUrlParams && !parentsMismatch &&
2228
- (!a.parent || equalParamsAndUrlSegments(a.parent, (b.parent)));
2215
+ (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));
2229
2216
  }
2230
2217
 
2231
2218
  /**
@@ -2394,11 +2381,9 @@ function computeNavigation(commands) {
2394
2381
  // skip './a'
2395
2382
  }
2396
2383
  else if (partIndex == 0 && urlPart === '') {
2397
- // '/a'
2398
2384
  isAbsolute = true;
2399
2385
  }
2400
2386
  else if (urlPart === '..') {
2401
- // '../a'
2402
2387
  numberOfDoubleDots++;
2403
2388
  }
2404
2389
  else if (urlPart != '') {
@@ -2436,7 +2421,7 @@ function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {
2436
2421
  var dd = numberOfDoubleDots;
2437
2422
  while (dd > ci) {
2438
2423
  dd -= ci;
2439
- g = (g.parent);
2424
+ g = g.parent;
2440
2425
  if (!g) {
2441
2426
  throw new Error('Invalid number of \'../\'');
2442
2427
  }
@@ -2637,15 +2622,7 @@ var PreActivation = /** @class */ (function () {
2637
2622
  * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2638
2623
  * proper state to run `checkGuards()` method.
2639
2624
  */
2640
- /**
2641
- * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2642
- * proper state to run `checkGuards()` method.
2643
- */
2644
- PreActivation.prototype.setupChildRouteGuards = /**
2645
- * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2646
- * proper state to run `checkGuards()` method.
2647
- */
2648
- function (futureNode, currNode, contexts, futurePath) {
2625
+ PreActivation.prototype.setupChildRouteGuards = function (futureNode, currNode, contexts, futurePath) {
2649
2626
  var _this = this;
2650
2627
  var prevChildren = nodeChildrenAsMap(currNode);
2651
2628
  // Process the children of the future route
@@ -2662,15 +2639,7 @@ var PreActivation = /** @class */ (function () {
2662
2639
  * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2663
2640
  * proper state to run `checkGuards()` method.
2664
2641
  */
2665
- /**
2666
- * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2667
- * proper state to run `checkGuards()` method.
2668
- */
2669
- PreActivation.prototype.setupRouteGuards = /**
2670
- * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2671
- * proper state to run `checkGuards()` method.
2672
- */
2673
- function (futureNode, currNode, parentContexts, futurePath) {
2642
+ PreActivation.prototype.setupRouteGuards = function (futureNode, currNode, parentContexts, futurePath) {
2674
2643
  var future = futureNode.value;
2675
2644
  var curr = currNode ? currNode.value : null;
2676
2645
  var context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;
@@ -2694,7 +2663,7 @@ var PreActivation = /** @class */ (function () {
2694
2663
  this.setupChildRouteGuards(futureNode, currNode, parentContexts, futurePath);
2695
2664
  }
2696
2665
  if (shouldRunGuardsAndResolvers) {
2697
- var outlet = (context.outlet);
2666
+ var outlet = context.outlet;
2698
2667
  this.canDeactivateChecks.push(new CanDeactivate(outlet.component, curr));
2699
2668
  }
2700
2669
  }
@@ -2758,13 +2727,11 @@ var PreActivation = /** @class */ (function () {
2758
2727
  PreActivation.prototype.runCanActivateChecks = function () {
2759
2728
  var _this = this;
2760
2729
  return from(this.canActivateChecks)
2761
- .pipe(concatMap(function (check) {
2762
- return andObservables(from([
2763
- _this.fireChildActivationStart(check.route.parent),
2764
- _this.fireActivationStart(check.route), _this.runCanActivateChild(check.path),
2765
- _this.runCanActivate(check.route)
2766
- ]));
2767
- }), every(function (result) { return result === true; }));
2730
+ .pipe(concatMap(function (check) { return andObservables(from([
2731
+ _this.fireChildActivationStart(check.route.parent),
2732
+ _this.fireActivationStart(check.route), _this.runCanActivateChild(check.path),
2733
+ _this.runCanActivate(check.route)
2734
+ ])); }), every(function (result) { return result === true; }));
2768
2735
  // this.fireChildActivationStart(check.path),
2769
2736
  };
2770
2737
  /**
@@ -2775,23 +2742,7 @@ var PreActivation = /** @class */ (function () {
2775
2742
  * return
2776
2743
  * `true` so checks continue to run.
2777
2744
  */
2778
- /**
2779
- * This should fire off `ActivationStart` events for each route being activated at this
2780
- * level.
2781
- * In other words, if you're activating `a` and `b` below, `path` will contain the
2782
- * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always
2783
- * return
2784
- * `true` so checks continue to run.
2785
- */
2786
- PreActivation.prototype.fireActivationStart = /**
2787
- * This should fire off `ActivationStart` events for each route being activated at this
2788
- * level.
2789
- * In other words, if you're activating `a` and `b` below, `path` will contain the
2790
- * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always
2791
- * return
2792
- * `true` so checks continue to run.
2793
- */
2794
- function (snapshot) {
2745
+ PreActivation.prototype.fireActivationStart = function (snapshot) {
2795
2746
  if (snapshot !== null && this.forwardEvent) {
2796
2747
  this.forwardEvent(new ActivationStart(snapshot));
2797
2748
  }
@@ -2805,23 +2756,7 @@ var PreActivation = /** @class */ (function () {
2805
2756
  * return
2806
2757
  * `true` so checks continue to run.
2807
2758
  */
2808
- /**
2809
- * This should fire off `ChildActivationStart` events for each route being activated at this
2810
- * level.
2811
- * In other words, if you're activating `a` and `b` below, `path` will contain the
2812
- * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always
2813
- * return
2814
- * `true` so checks continue to run.
2815
- */
2816
- PreActivation.prototype.fireChildActivationStart = /**
2817
- * This should fire off `ChildActivationStart` events for each route being activated at this
2818
- * level.
2819
- * In other words, if you're activating `a` and `b` below, `path` will contain the
2820
- * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always
2821
- * return
2822
- * `true` so checks continue to run.
2823
- */
2824
- function (snapshot) {
2759
+ PreActivation.prototype.fireChildActivationStart = function (snapshot) {
2825
2760
  if (snapshot !== null && this.forwardEvent) {
2826
2761
  this.forwardEvent(new ChildActivationStart(snapshot));
2827
2762
  }
@@ -2974,7 +2909,7 @@ var Recognizer = /** @class */ (function () {
2974
2909
  try {
2975
2910
  var rootSegmentGroup = split$1(this.urlTree.root, [], [], this.config).segmentGroup;
2976
2911
  var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);
2977
- var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(__assign({}, this.urlTree.queryParams)), (this.urlTree.fragment), {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});
2912
+ var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});
2978
2913
  var rootNode = new TreeNode(root, children);
2979
2914
  var routeState = new RouterStateSnapshot(this.url, rootNode);
2980
2915
  this.inheritParamsAndData(routeState._root);
@@ -3044,13 +2979,13 @@ var Recognizer = /** @class */ (function () {
3044
2979
  var rawSlicedSegments = [];
3045
2980
  if (route.path === '**') {
3046
2981
  var params = segments.length > 0 ? last$1(segments).parameters : {};
3047
- snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(__assign({}, this.urlTree.queryParams)), (this.urlTree.fragment), getData(route), outlet, (route.component), route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));
2982
+ snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));
3048
2983
  }
3049
2984
  else {
3050
2985
  var result = match$1(rawSegment, route, segments);
3051
2986
  consumedSegments = result.consumedSegments;
3052
2987
  rawSlicedSegments = segments.slice(result.lastChild);
3053
- snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(__assign({}, this.urlTree.queryParams)), (this.urlTree.fragment), getData(route), outlet, (route.component), route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));
2988
+ snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));
3054
2989
  }
3055
2990
  var childConfig = getChildConfig(route);
3056
2991
  var _a = split$1(rawSegment, consumedSegments, rawSlicedSegments, childConfig), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;
@@ -3096,7 +3031,7 @@ function match$1(segmentGroup, route, segments) {
3096
3031
  if (!res)
3097
3032
  throw new NoMatch$1();
3098
3033
  var posParams = {};
3099
- forEach((res.posParams), function (v, k) { posParams[k] = v.path; });
3034
+ forEach(res.posParams, function (v, k) { posParams[k] = v.path; });
3100
3035
  var parameters = res.consumed.length > 0 ? __assign({}, posParams, res.consumed[res.consumed.length - 1].parameters) :
3101
3036
  posParams;
3102
3037
  return { consumedSegments: res.consumed, lastChild: res.consumed.length, parameters: parameters };
@@ -3262,6 +3197,7 @@ var DefaultRouteReuseStrategy = /** @class */ (function () {
3262
3197
  * Use of this source code is governed by an MIT-style license that can be
3263
3198
  * found in the LICENSE file at https://angular.io/license
3264
3199
  */
3200
+ // TODO(i): switch to fromPromise once it's expored in rxjs
3265
3201
  /**
3266
3202
  * @docsNotRequired
3267
3203
  * @experimental
@@ -3279,13 +3215,13 @@ var RouterConfigLoader = /** @class */ (function () {
3279
3215
  if (this.onLoadStartListener) {
3280
3216
  this.onLoadStartListener(route);
3281
3217
  }
3282
- var moduleFactory$ = this.loadModuleFactory((route.loadChildren));
3218
+ var moduleFactory$ = this.loadModuleFactory(route.loadChildren);
3283
3219
  return moduleFactory$.pipe(map(function (factory) {
3284
3220
  if (_this.onLoadEndListener) {
3285
3221
  _this.onLoadEndListener(route);
3286
3222
  }
3287
3223
  var module = factory.create(parentInjector);
3288
- return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(copyConfig), module);
3224
+ return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);
3289
3225
  }));
3290
3226
  };
3291
3227
  RouterConfigLoader.prototype.loadModuleFactory = function (loadChildren) {
@@ -3377,49 +3313,49 @@ var Router = /** @class */ (function () {
3377
3313
  this.rootContexts = rootContexts;
3378
3314
  this.location = location;
3379
3315
  this.config = config;
3380
- this.navigations = new BehaviorSubject((null));
3316
+ this.navigations = new BehaviorSubject(null);
3381
3317
  this.navigationId = 0;
3382
3318
  this.events = new Subject();
3383
3319
  /**
3384
- * Error handler that is invoked when a navigation errors.
3385
- *
3386
- * See `ErrorHandler` for more information.
3387
- */
3320
+ * Error handler that is invoked when a navigation errors.
3321
+ *
3322
+ * See `ErrorHandler` for more information.
3323
+ */
3388
3324
  this.errorHandler = defaultErrorHandler;
3389
3325
  /**
3390
- * Indicates if at least one navigation happened.
3391
- */
3326
+ * Indicates if at least one navigation happened.
3327
+ */
3392
3328
  this.navigated = false;
3393
3329
  this.lastSuccessfulId = -1;
3394
3330
  /**
3395
- * Used by RouterModule. This allows us to
3396
- * pause the navigation either before preactivation or after it.
3397
- * @internal
3398
- */
3331
+ * Used by RouterModule. This allows us to
3332
+ * pause the navigation either before preactivation or after it.
3333
+ * @internal
3334
+ */
3399
3335
  this.hooks = {
3400
3336
  beforePreactivation: defaultRouterHook,
3401
3337
  afterPreactivation: defaultRouterHook
3402
3338
  };
3403
3339
  /**
3404
- * Extracts and merges URLs. Used for AngularJS to Angular migrations.
3405
- */
3340
+ * Extracts and merges URLs. Used for AngularJS to Angular migrations.
3341
+ */
3406
3342
  this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();
3407
3343
  this.routeReuseStrategy = new DefaultRouteReuseStrategy();
3408
3344
  /**
3409
- * Define what the router should do if it receives a navigation request to the current URL.
3410
- * By default, the router will ignore this navigation. However, this prevents features such
3411
- * as a "refresh" button. Use this option to configure the behavior when navigating to the
3412
- * current URL. Default is 'ignore'.
3413
- */
3345
+ * Define what the router should do if it receives a navigation request to the current URL.
3346
+ * By default, the router will ignore this navigation. However, this prevents features such
3347
+ * as a "refresh" button. Use this option to configure the behavior when navigating to the
3348
+ * current URL. Default is 'ignore'.
3349
+ */
3414
3350
  this.onSameUrlNavigation = 'ignore';
3415
3351
  /**
3416
- * Defines how the router merges params, data and resolved data from parent to child
3417
- * routes. Available options are:
3418
- *
3419
- * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less
3420
- * routes.
3421
- * - `'always'`, enables unconditional inheritance of parent params.
3422
- */
3352
+ * Defines how the router merges params, data and resolved data from parent to child
3353
+ * routes. Available options are:
3354
+ *
3355
+ * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less
3356
+ * routes.
3357
+ * - `'always'`, enables unconditional inheritance of parent params.
3358
+ */
3423
3359
  this.paramsInheritanceStrategy = 'emptyOnly';
3424
3360
  var onLoadStart = function (r) { return _this.triggerEvent(new RouteConfigLoadStart(r)); };
3425
3361
  var onLoadEnd = function (r) { return _this.triggerEvent(new RouteConfigLoadEnd(r)); };
@@ -3435,15 +3371,7 @@ var Router = /** @class */ (function () {
3435
3371
  * @internal
3436
3372
  * TODO: this should be removed once the constructor of the router made internal
3437
3373
  */
3438
- /**
3439
- * @internal
3440
- * TODO: this should be removed once the constructor of the router made internal
3441
- */
3442
- Router.prototype.resetRootComponentType = /**
3443
- * @internal
3444
- * TODO: this should be removed once the constructor of the router made internal
3445
- */
3446
- function (rootComponentType) {
3374
+ Router.prototype.resetRootComponentType = function (rootComponentType) {
3447
3375
  this.rootComponentType = rootComponentType;
3448
3376
  // TODO: vsavkin router 4.0 should make the root component set to null
3449
3377
  // this will simplify the lifecycle of the router.
@@ -3452,13 +3380,7 @@ var Router = /** @class */ (function () {
3452
3380
  /**
3453
3381
  * Sets up the location change listener and performs the initial navigation.
3454
3382
  */
3455
- /**
3456
- * Sets up the location change listener and performs the initial navigation.
3457
- */
3458
- Router.prototype.initialNavigation = /**
3459
- * Sets up the location change listener and performs the initial navigation.
3460
- */
3461
- function () {
3383
+ Router.prototype.initialNavigation = function () {
3462
3384
  this.setUpLocationChangeListener();
3463
3385
  if (this.navigationId === 0) {
3464
3386
  this.navigateByUrl(this.location.path(true), { replaceUrl: true });
@@ -3467,13 +3389,7 @@ var Router = /** @class */ (function () {
3467
3389
  /**
3468
3390
  * Sets up the location change listener.
3469
3391
  */
3470
- /**
3471
- * Sets up the location change listener.
3472
- */
3473
- Router.prototype.setUpLocationChangeListener = /**
3474
- * Sets up the location change listener.
3475
- */
3476
- function () {
3392
+ Router.prototype.setUpLocationChangeListener = function () {
3477
3393
  var _this = this;
3478
3394
  // Don't need to use Zone.wrap any more, because zone.js
3479
3395
  // already patch onPopState, so location change callback will
@@ -3491,15 +3407,12 @@ var Router = /** @class */ (function () {
3491
3407
  };
3492
3408
  Object.defineProperty(Router.prototype, "url", {
3493
3409
  /** The current url */
3494
- get: /** The current url */
3495
- function () { return this.serializeUrl(this.currentUrlTree); },
3410
+ get: function () { return this.serializeUrl(this.currentUrlTree); },
3496
3411
  enumerable: true,
3497
3412
  configurable: true
3498
3413
  });
3499
3414
  /** @internal */
3500
- /** @internal */
3501
- Router.prototype.triggerEvent = /** @internal */
3502
- function (e) { this.events.next(e); };
3415
+ Router.prototype.triggerEvent = function (e) { this.events.next(e); };
3503
3416
  /**
3504
3417
  * Resets the configuration used for navigation and generating links.
3505
3418
  *
@@ -3514,51 +3427,19 @@ var Router = /** @class */ (function () {
3514
3427
  * ]);
3515
3428
  * ```
3516
3429
  */
3517
- /**
3518
- * Resets the configuration used for navigation and generating links.
3519
- *
3520
- * ### Usage
3521
- *
3522
- * ```
3523
- * router.resetConfig([
3524
- * { path: 'team/:id', component: TeamCmp, children: [
3525
- * { path: 'simple', component: SimpleCmp },
3526
- * { path: 'user/:name', component: UserCmp }
3527
- * ]}
3528
- * ]);
3529
- * ```
3530
- */
3531
- Router.prototype.resetConfig = /**
3532
- * Resets the configuration used for navigation and generating links.
3533
- *
3534
- * ### Usage
3535
- *
3536
- * ```
3537
- * router.resetConfig([
3538
- * { path: 'team/:id', component: TeamCmp, children: [
3539
- * { path: 'simple', component: SimpleCmp },
3540
- * { path: 'user/:name', component: UserCmp }
3541
- * ]}
3542
- * ]);
3543
- * ```
3544
- */
3545
- function (config) {
3430
+ Router.prototype.resetConfig = function (config) {
3546
3431
  validateConfig(config);
3547
- this.config = config.map(copyConfig);
3432
+ this.config = config.map(standardizeConfig);
3548
3433
  this.navigated = false;
3549
3434
  this.lastSuccessfulId = -1;
3550
3435
  };
3551
3436
  /** @docsNotRequired */
3552
- /** @docsNotRequired */
3553
- Router.prototype.ngOnDestroy = /** @docsNotRequired */
3554
- function () { this.dispose(); };
3437
+ Router.prototype.ngOnDestroy = function () { this.dispose(); };
3555
3438
  /** Disposes of the router */
3556
- /** Disposes of the router */
3557
- Router.prototype.dispose = /** Disposes of the router */
3558
- function () {
3439
+ Router.prototype.dispose = function () {
3559
3440
  if (this.locationSubscription) {
3560
3441
  this.locationSubscription.unsubscribe();
3561
- this.locationSubscription = (null);
3442
+ this.locationSubscription = null;
3562
3443
  }
3563
3444
  };
3564
3445
  /**
@@ -3602,89 +3483,7 @@ var Router = /** @class */ (function () {
3602
3483
  * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
3603
3484
  * ```
3604
3485
  */
3605
- /**
3606
- * Applies an array of commands to the current url tree and creates a new url tree.
3607
- *
3608
- * When given an activate route, applies the given commands starting from the route.
3609
- * When not given a route, applies the given command starting from the root.
3610
- *
3611
- * ### Usage
3612
- *
3613
- * ```
3614
- * // create /team/33/user/11
3615
- * router.createUrlTree(['/team', 33, 'user', 11]);
3616
- *
3617
- * // create /team/33;expand=true/user/11
3618
- * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);
3619
- *
3620
- * // you can collapse static segments like this (this works only with the first passed-in value):
3621
- * router.createUrlTree(['/team/33/user', userId]);
3622
- *
3623
- * // If the first segment can contain slashes, and you do not want the router to split it, you
3624
- * // can do the following:
3625
- *
3626
- * router.createUrlTree([{segmentPath: '/one/two'}]);
3627
- *
3628
- * // create /team/33/(user/11//right:chat)
3629
- * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);
3630
- *
3631
- * // remove the right secondary node
3632
- * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);
3633
- *
3634
- * // assuming the current url is `/team/33/user/11` and the route points to `user/11`
3635
- *
3636
- * // navigate to /team/33/user/11/details
3637
- * router.createUrlTree(['details'], {relativeTo: route});
3638
- *
3639
- * // navigate to /team/33/user/22
3640
- * router.createUrlTree(['../22'], {relativeTo: route});
3641
- *
3642
- * // navigate to /team/44/user/22
3643
- * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
3644
- * ```
3645
- */
3646
- Router.prototype.createUrlTree = /**
3647
- * Applies an array of commands to the current url tree and creates a new url tree.
3648
- *
3649
- * When given an activate route, applies the given commands starting from the route.
3650
- * When not given a route, applies the given command starting from the root.
3651
- *
3652
- * ### Usage
3653
- *
3654
- * ```
3655
- * // create /team/33/user/11
3656
- * router.createUrlTree(['/team', 33, 'user', 11]);
3657
- *
3658
- * // create /team/33;expand=true/user/11
3659
- * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);
3660
- *
3661
- * // you can collapse static segments like this (this works only with the first passed-in value):
3662
- * router.createUrlTree(['/team/33/user', userId]);
3663
- *
3664
- * // If the first segment can contain slashes, and you do not want the router to split it, you
3665
- * // can do the following:
3666
- *
3667
- * router.createUrlTree([{segmentPath: '/one/two'}]);
3668
- *
3669
- * // create /team/33/(user/11//right:chat)
3670
- * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);
3671
- *
3672
- * // remove the right secondary node
3673
- * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);
3674
- *
3675
- * // assuming the current url is `/team/33/user/11` and the route points to `user/11`
3676
- *
3677
- * // navigate to /team/33/user/11/details
3678
- * router.createUrlTree(['details'], {relativeTo: route});
3679
- *
3680
- * // navigate to /team/33/user/22
3681
- * router.createUrlTree(['../22'], {relativeTo: route});
3682
- *
3683
- * // navigate to /team/44/user/22
3684
- * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
3685
- * ```
3686
- */
3687
- function (commands, navigationExtras) {
3486
+ Router.prototype.createUrlTree = function (commands, navigationExtras) {
3688
3487
  if (navigationExtras === void 0) { navigationExtras = {}; }
3689
3488
  var relativeTo = navigationExtras.relativeTo, queryParams = navigationExtras.queryParams, fragment = navigationExtras.fragment, preserveQueryParams = navigationExtras.preserveQueryParams, queryParamsHandling = navigationExtras.queryParamsHandling, preserveFragment = navigationExtras.preserveFragment;
3690
3489
  if (isDevMode() && preserveQueryParams && console && console.warn) {
@@ -3711,7 +3510,7 @@ var Router = /** @class */ (function () {
3711
3510
  if (q !== null) {
3712
3511
  q = this.removeEmptyProps(q);
3713
3512
  }
3714
- return createUrlTree(a, this.currentUrlTree, commands, (q), (f));
3513
+ return createUrlTree(a, this.currentUrlTree, commands, q, f);
3715
3514
  };
3716
3515
  /**
3717
3516
  * Navigate based on the provided url. This navigation is always absolute.
@@ -3733,47 +3532,7 @@ var Router = /** @class */ (function () {
3733
3532
  * In opposite to `navigate`, `navigateByUrl` takes a whole URL
3734
3533
  * and does not apply any delta to the current one.
3735
3534
  */
3736
- /**
3737
- * Navigate based on the provided url. This navigation is always absolute.
3738
- *
3739
- * Returns a promise that:
3740
- * - resolves to 'true' when navigation succeeds,
3741
- * - resolves to 'false' when navigation fails,
3742
- * - is rejected when an error happens.
3743
- *
3744
- * ### Usage
3745
- *
3746
- * ```
3747
- * router.navigateByUrl("/team/33/user/11");
3748
- *
3749
- * // Navigate without updating the URL
3750
- * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
3751
- * ```
3752
- *
3753
- * In opposite to `navigate`, `navigateByUrl` takes a whole URL
3754
- * and does not apply any delta to the current one.
3755
- */
3756
- Router.prototype.navigateByUrl = /**
3757
- * Navigate based on the provided url. This navigation is always absolute.
3758
- *
3759
- * Returns a promise that:
3760
- * - resolves to 'true' when navigation succeeds,
3761
- * - resolves to 'false' when navigation fails,
3762
- * - is rejected when an error happens.
3763
- *
3764
- * ### Usage
3765
- *
3766
- * ```
3767
- * router.navigateByUrl("/team/33/user/11");
3768
- *
3769
- * // Navigate without updating the URL
3770
- * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
3771
- * ```
3772
- *
3773
- * In opposite to `navigate`, `navigateByUrl` takes a whole URL
3774
- * and does not apply any delta to the current one.
3775
- */
3776
- function (url, extras) {
3535
+ Router.prototype.navigateByUrl = function (url, extras) {
3777
3536
  if (extras === void 0) { extras = { skipLocationChange: false }; }
3778
3537
  var urlTree = url instanceof UrlTree ? url : this.parseUrl(url);
3779
3538
  var mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);
@@ -3800,65 +3559,17 @@ var Router = /** @class */ (function () {
3800
3559
  * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current
3801
3560
  * URL.
3802
3561
  */
3803
- /**
3804
- * Navigate based on the provided array of commands and a starting point.
3805
- * If no starting route is provided, the navigation is absolute.
3806
- *
3807
- * Returns a promise that:
3808
- * - resolves to 'true' when navigation succeeds,
3809
- * - resolves to 'false' when navigation fails,
3810
- * - is rejected when an error happens.
3811
- *
3812
- * ### Usage
3813
- *
3814
- * ```
3815
- * router.navigate(['team', 33, 'user', 11], {relativeTo: route});
3816
- *
3817
- * // Navigate without updating the URL
3818
- * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});
3819
- * ```
3820
- *
3821
- * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current
3822
- * URL.
3823
- */
3824
- Router.prototype.navigate = /**
3825
- * Navigate based on the provided array of commands and a starting point.
3826
- * If no starting route is provided, the navigation is absolute.
3827
- *
3828
- * Returns a promise that:
3829
- * - resolves to 'true' when navigation succeeds,
3830
- * - resolves to 'false' when navigation fails,
3831
- * - is rejected when an error happens.
3832
- *
3833
- * ### Usage
3834
- *
3835
- * ```
3836
- * router.navigate(['team', 33, 'user', 11], {relativeTo: route});
3837
- *
3838
- * // Navigate without updating the URL
3839
- * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});
3840
- * ```
3841
- *
3842
- * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current
3843
- * URL.
3844
- */
3845
- function (commands, extras) {
3562
+ Router.prototype.navigate = function (commands, extras) {
3846
3563
  if (extras === void 0) { extras = { skipLocationChange: false }; }
3847
3564
  validateCommands(commands);
3848
3565
  return this.navigateByUrl(this.createUrlTree(commands, extras), extras);
3849
3566
  };
3850
3567
  /** Serializes a `UrlTree` into a string */
3851
- /** Serializes a `UrlTree` into a string */
3852
- Router.prototype.serializeUrl = /** Serializes a `UrlTree` into a string */
3853
- function (url) { return this.urlSerializer.serialize(url); };
3568
+ Router.prototype.serializeUrl = function (url) { return this.urlSerializer.serialize(url); };
3854
3569
  /** Parses a string into a `UrlTree` */
3855
- /** Parses a string into a `UrlTree` */
3856
- Router.prototype.parseUrl = /** Parses a string into a `UrlTree` */
3857
- function (url) { return this.urlSerializer.parse(url); };
3858
- /** Returns whether the url is activated */
3570
+ Router.prototype.parseUrl = function (url) { return this.urlSerializer.parse(url); };
3859
3571
  /** Returns whether the url is activated */
3860
- Router.prototype.isActive = /** Returns whether the url is activated */
3861
- function (url, exact) {
3572
+ Router.prototype.isActive = function (url, exact) {
3862
3573
  if (url instanceof UrlTree) {
3863
3574
  return containsTree(this.currentUrlTree, url, exact);
3864
3575
  }
@@ -3935,9 +3646,7 @@ var Router = /** @class */ (function () {
3935
3646
  this.events
3936
3647
  .next(new NavigationStart(id, this.serializeUrl(url), source, state));
3937
3648
  Promise.resolve()
3938
- .then(function (_) {
3939
- return _this.runNavigate(url, rawUrl, !!extras.skipLocationChange, !!extras.replaceUrl, id, null);
3940
- })
3649
+ .then(function (_) { return _this.runNavigate(url, rawUrl, !!extras.skipLocationChange, !!extras.replaceUrl, id, null); })
3941
3650
  .then(resolve, reject);
3942
3651
  // we cannot process the current URL, but we could process the previous one =>
3943
3652
  // we need to do some cleanup
@@ -3947,9 +3656,7 @@ var Router = /** @class */ (function () {
3947
3656
  this.events
3948
3657
  .next(new NavigationStart(id, this.serializeUrl(url), source, state));
3949
3658
  Promise.resolve()
3950
- .then(function (_) {
3951
- return _this.runNavigate(url, rawUrl, false, false, id, createEmptyState(url, _this.rootComponentType).snapshot);
3952
- })
3659
+ .then(function (_) { return _this.runNavigate(url, rawUrl, false, false, id, createEmptyState(url, _this.rootComponentType).snapshot); })
3953
3660
  .then(resolve, reject);
3954
3661
  }
3955
3662
  else {
@@ -4049,15 +3756,7 @@ var Router = /** @class */ (function () {
4049
3756
  * Performs the logic of activating routes. This is a synchronous process by default. While this
4050
3757
  * is a private method, it could be overridden to make activation asynchronous.
4051
3758
  */
4052
- /**
4053
- * Performs the logic of activating routes. This is a synchronous process by default. While this
4054
- * is a private method, it could be overridden to make activation asynchronous.
4055
- */
4056
- Router.prototype.activateRoutes = /**
4057
- * Performs the logic of activating routes. This is a synchronous process by default. While this
4058
- * is a private method, it could be overridden to make activation asynchronous.
4059
- */
4060
- function (state, storedState, storedUrl, id, url, rawUrl, skipLocationChange, replaceUrl, resolvePromise, rejectPromise) {
3759
+ Router.prototype.activateRoutes = function (state, storedState, storedUrl, id, url, rawUrl, skipLocationChange, replaceUrl, resolvePromise, rejectPromise) {
4061
3760
  var _this = this;
4062
3761
  // applied the new router state
4063
3762
  // this operation has side effects
@@ -4146,10 +3845,7 @@ var ActivateRoutes = /** @class */ (function () {
4146
3845
  this.activateChildRoutes(futureRoot, currRoot, parentContexts);
4147
3846
  };
4148
3847
  // De-activate the child route that are not re-used for the future state
4149
- // De-activate the child route that are not re-used for the future state
4150
- ActivateRoutes.prototype.deactivateChildRoutes =
4151
- // De-activate the child route that are not re-used for the future state
4152
- function (futureNode, currNode, contexts) {
3848
+ ActivateRoutes.prototype.deactivateChildRoutes = function (futureNode, currNode, contexts) {
4153
3849
  var _this = this;
4154
3850
  var children = nodeChildrenAsMap(currNode);
4155
3851
  // Recurse on the routes active in the future state to de-activate deeper children
@@ -4408,10 +4104,10 @@ var RouterLink = /** @class */ (function () {
4408
4104
  configurable: true
4409
4105
  });
4410
4106
  Object.defineProperty(RouterLink.prototype, "preserveQueryParams", {
4411
- set: /**
4412
- * @deprecated 4.0.0 use `queryParamsHandling` instead.
4413
- */
4414
- function (value) {
4107
+ /**
4108
+ * @deprecated 4.0.0 use `queryParamsHandling` instead.
4109
+ */
4110
+ set: function (value) {
4415
4111
  if (isDevMode() && console && console.warn) {
4416
4112
  console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');
4417
4113
  }
@@ -4447,22 +4143,22 @@ var RouterLink = /** @class */ (function () {
4447
4143
  ];
4448
4144
  /** @nocollapse */
4449
4145
  RouterLink.ctorParameters = function () { return [
4450
- { type: Router, },
4451
- { type: ActivatedRoute, },
4452
- { type: undefined, decorators: [{ type: Attribute, args: ['tabindex',] },] },
4453
- { type: Renderer2, },
4454
- { type: ElementRef, },
4146
+ { type: Router },
4147
+ { type: ActivatedRoute },
4148
+ { type: String, decorators: [{ type: Attribute, args: ['tabindex',] }] },
4149
+ { type: Renderer2 },
4150
+ { type: ElementRef }
4455
4151
  ]; };
4456
4152
  RouterLink.propDecorators = {
4457
- "queryParams": [{ type: Input },],
4458
- "fragment": [{ type: Input },],
4459
- "queryParamsHandling": [{ type: Input },],
4460
- "preserveFragment": [{ type: Input },],
4461
- "skipLocationChange": [{ type: Input },],
4462
- "replaceUrl": [{ type: Input },],
4463
- "routerLink": [{ type: Input },],
4464
- "preserveQueryParams": [{ type: Input },],
4465
- "onClick": [{ type: HostListener, args: ['click',] },],
4153
+ queryParams: [{ type: Input }],
4154
+ fragment: [{ type: Input }],
4155
+ queryParamsHandling: [{ type: Input }],
4156
+ preserveFragment: [{ type: Input }],
4157
+ skipLocationChange: [{ type: Input }],
4158
+ replaceUrl: [{ type: Input }],
4159
+ routerLink: [{ type: Input }],
4160
+ preserveQueryParams: [{ type: Input }],
4161
+ onClick: [{ type: HostListener, args: ['click',] }]
4466
4162
  };
4467
4163
  return RouterLink;
4468
4164
  }());
@@ -4550,22 +4246,22 @@ var RouterLinkWithHref = /** @class */ (function () {
4550
4246
  ];
4551
4247
  /** @nocollapse */
4552
4248
  RouterLinkWithHref.ctorParameters = function () { return [
4553
- { type: Router, },
4554
- { type: ActivatedRoute, },
4555
- { type: LocationStrategy, },
4249
+ { type: Router },
4250
+ { type: ActivatedRoute },
4251
+ { type: LocationStrategy }
4556
4252
  ]; };
4557
4253
  RouterLinkWithHref.propDecorators = {
4558
- "target": [{ type: HostBinding, args: ['attr.target',] }, { type: Input },],
4559
- "queryParams": [{ type: Input },],
4560
- "fragment": [{ type: Input },],
4561
- "queryParamsHandling": [{ type: Input },],
4562
- "preserveFragment": [{ type: Input },],
4563
- "skipLocationChange": [{ type: Input },],
4564
- "replaceUrl": [{ type: Input },],
4565
- "href": [{ type: HostBinding },],
4566
- "routerLink": [{ type: Input },],
4567
- "preserveQueryParams": [{ type: Input },],
4568
- "onClick": [{ type: HostListener, args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'],] },],
4254
+ target: [{ type: HostBinding, args: ['attr.target',] }, { type: Input }],
4255
+ queryParams: [{ type: Input }],
4256
+ fragment: [{ type: Input }],
4257
+ queryParamsHandling: [{ type: Input }],
4258
+ preserveFragment: [{ type: Input }],
4259
+ skipLocationChange: [{ type: Input }],
4260
+ replaceUrl: [{ type: Input }],
4261
+ href: [{ type: HostBinding }],
4262
+ routerLink: [{ type: Input }],
4263
+ preserveQueryParams: [{ type: Input }],
4264
+ onClick: [{ type: HostListener, args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'],] }]
4569
4265
  };
4570
4266
  return RouterLinkWithHref;
4571
4267
  }());
@@ -4706,16 +4402,16 @@ var RouterLinkActive = /** @class */ (function () {
4706
4402
  ];
4707
4403
  /** @nocollapse */
4708
4404
  RouterLinkActive.ctorParameters = function () { return [
4709
- { type: Router, },
4710
- { type: ElementRef, },
4711
- { type: Renderer2, },
4712
- { type: ChangeDetectorRef, },
4405
+ { type: Router },
4406
+ { type: ElementRef },
4407
+ { type: Renderer2 },
4408
+ { type: ChangeDetectorRef }
4713
4409
  ]; };
4714
4410
  RouterLinkActive.propDecorators = {
4715
- "links": [{ type: ContentChildren, args: [RouterLink, { descendants: true },] },],
4716
- "linksWithHrefs": [{ type: ContentChildren, args: [RouterLinkWithHref, { descendants: true },] },],
4717
- "routerLinkActiveOptions": [{ type: Input },],
4718
- "routerLinkActive": [{ type: Input },],
4411
+ links: [{ type: ContentChildren, args: [RouterLink, { descendants: true },] }],
4412
+ linksWithHrefs: [{ type: ContentChildren, args: [RouterLinkWithHref, { descendants: true },] }],
4413
+ routerLinkActiveOptions: [{ type: Input }],
4414
+ routerLinkActive: [{ type: Input }]
4719
4415
  };
4720
4416
  return RouterLinkActive;
4721
4417
  }());
@@ -4753,9 +4449,7 @@ var ChildrenOutletContexts = /** @class */ (function () {
4753
4449
  this.contexts = new Map();
4754
4450
  }
4755
4451
  /** Called when a `RouterOutlet` directive is instantiated */
4756
- /** Called when a `RouterOutlet` directive is instantiated */
4757
- ChildrenOutletContexts.prototype.onChildOutletCreated = /** Called when a `RouterOutlet` directive is instantiated */
4758
- function (childName, outlet) {
4452
+ ChildrenOutletContexts.prototype.onChildOutletCreated = function (childName, outlet) {
4759
4453
  var context = this.getOrCreateContext(childName);
4760
4454
  context.outlet = outlet;
4761
4455
  this.contexts.set(childName, context);
@@ -4765,17 +4459,7 @@ var ChildrenOutletContexts = /** @class */ (function () {
4765
4459
  * We need to keep the context as the outlet could be destroyed inside a NgIf and might be
4766
4460
  * re-created later.
4767
4461
  */
4768
- /**
4769
- * Called when a `RouterOutlet` directive is destroyed.
4770
- * We need to keep the context as the outlet could be destroyed inside a NgIf and might be
4771
- * re-created later.
4772
- */
4773
- ChildrenOutletContexts.prototype.onChildOutletDestroyed = /**
4774
- * Called when a `RouterOutlet` directive is destroyed.
4775
- * We need to keep the context as the outlet could be destroyed inside a NgIf and might be
4776
- * re-created later.
4777
- */
4778
- function (childName) {
4462
+ ChildrenOutletContexts.prototype.onChildOutletDestroyed = function (childName) {
4779
4463
  var context = this.getContext(childName);
4780
4464
  if (context) {
4781
4465
  context.outlet = null;
@@ -4785,15 +4469,7 @@ var ChildrenOutletContexts = /** @class */ (function () {
4785
4469
  * Called when the corresponding route is deactivated during navigation.
4786
4470
  * Because the component get destroyed, all children outlet are destroyed.
4787
4471
  */
4788
- /**
4789
- * Called when the corresponding route is deactivated during navigation.
4790
- * Because the component get destroyed, all children outlet are destroyed.
4791
- */
4792
- ChildrenOutletContexts.prototype.onOutletDeactivated = /**
4793
- * Called when the corresponding route is deactivated during navigation.
4794
- * Because the component get destroyed, all children outlet are destroyed.
4795
- */
4796
- function () {
4472
+ ChildrenOutletContexts.prototype.onOutletDeactivated = function () {
4797
4473
  var contexts = this.contexts;
4798
4474
  this.contexts = new Map();
4799
4475
  return contexts;
@@ -4908,13 +4584,7 @@ var RouterOutlet = /** @class */ (function () {
4908
4584
  /**
4909
4585
  * Called when the `RouteReuseStrategy` instructs to detach the subtree
4910
4586
  */
4911
- /**
4912
- * Called when the `RouteReuseStrategy` instructs to detach the subtree
4913
- */
4914
- RouterOutlet.prototype.detach = /**
4915
- * Called when the `RouteReuseStrategy` instructs to detach the subtree
4916
- */
4917
- function () {
4587
+ RouterOutlet.prototype.detach = function () {
4918
4588
  if (!this.activated)
4919
4589
  throw new Error('Outlet is not activated');
4920
4590
  this.location.detach();
@@ -4926,13 +4596,7 @@ var RouterOutlet = /** @class */ (function () {
4926
4596
  /**
4927
4597
  * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
4928
4598
  */
4929
- /**
4930
- * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
4931
- */
4932
- RouterOutlet.prototype.attach = /**
4933
- * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
4934
- */
4935
- function (ref, activatedRoute) {
4599
+ RouterOutlet.prototype.attach = function (ref, activatedRoute) {
4936
4600
  this.activated = ref;
4937
4601
  this._activatedRoute = activatedRoute;
4938
4602
  this.location.insert(ref.hostView);
@@ -4968,15 +4632,15 @@ var RouterOutlet = /** @class */ (function () {
4968
4632
  ];
4969
4633
  /** @nocollapse */
4970
4634
  RouterOutlet.ctorParameters = function () { return [
4971
- { type: ChildrenOutletContexts, },
4972
- { type: ViewContainerRef, },
4973
- { type: ComponentFactoryResolver, },
4974
- { type: undefined, decorators: [{ type: Attribute, args: ['name',] },] },
4975
- { type: ChangeDetectorRef, },
4635
+ { type: ChildrenOutletContexts },
4636
+ { type: ViewContainerRef },
4637
+ { type: ComponentFactoryResolver },
4638
+ { type: String, decorators: [{ type: Attribute, args: ['name',] }] },
4639
+ { type: ChangeDetectorRef }
4976
4640
  ]; };
4977
4641
  RouterOutlet.propDecorators = {
4978
- "activateEvents": [{ type: Output, args: ['activate',] },],
4979
- "deactivateEvents": [{ type: Output, args: ['deactivate',] },],
4642
+ activateEvents: [{ type: Output, args: ['activate',] }],
4643
+ deactivateEvents: [{ type: Output, args: ['deactivate',] }]
4980
4644
  };
4981
4645
  return RouterOutlet;
4982
4646
  }());
@@ -5086,14 +4750,7 @@ var RouterPreloader = /** @class */ (function () {
5086
4750
  // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If
5087
4751
  // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This
5088
4752
  // should be refactored.
5089
- // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If
5090
- // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This
5091
- // should be refactored.
5092
- RouterPreloader.prototype.ngOnDestroy =
5093
- // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If
5094
- // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This
5095
- // should be refactored.
5096
- function () { this.subscription.unsubscribe(); };
4753
+ RouterPreloader.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };
5097
4754
  RouterPreloader.prototype.processRoutes = function (ngModule, routes) {
5098
4755
  var res = [];
5099
4756
  try {
@@ -5139,11 +4796,11 @@ var RouterPreloader = /** @class */ (function () {
5139
4796
  ];
5140
4797
  /** @nocollapse */
5141
4798
  RouterPreloader.ctorParameters = function () { return [
5142
- { type: Router, },
5143
- { type: NgModuleFactoryLoader, },
5144
- { type: Compiler, },
5145
- { type: Injector, },
5146
- { type: PreloadingStrategy, },
4799
+ { type: Router },
4800
+ { type: NgModuleFactoryLoader },
4801
+ { type: Compiler },
4802
+ { type: Injector },
4803
+ { type: PreloadingStrategy }
5147
4804
  ]; };
5148
4805
  return RouterPreloader;
5149
4806
  }());
@@ -5162,7 +4819,7 @@ var RouterPreloader = /** @class */ (function () {
5162
4819
  *
5163
4820
  *
5164
4821
  */
5165
- var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive];
4822
+ var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];
5166
4823
  /**
5167
4824
  * @description
5168
4825
  *
@@ -5267,35 +4924,7 @@ var RouterModule = /** @class */ (function () {
5267
4924
  * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See
5268
4925
  * `ExtraOptions` for more details.
5269
4926
  */
5270
- /**
5271
- * Creates a module with all the router providers and directives. It also optionally sets up an
5272
- * application listener to perform an initial navigation.
5273
- *
5274
- * Options (see `ExtraOptions`):
5275
- * * `enableTracing` makes the router log all its internal events to the console.
5276
- * * `useHash` enables the location strategy that uses the URL fragment instead of the history
5277
- * API.
5278
- * * `initialNavigation` disables the initial navigation.
5279
- * * `errorHandler` provides a custom error handler.
5280
- * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).
5281
- * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See
5282
- * `ExtraOptions` for more details.
5283
- */
5284
- RouterModule.forRoot = /**
5285
- * Creates a module with all the router providers and directives. It also optionally sets up an
5286
- * application listener to perform an initial navigation.
5287
- *
5288
- * Options (see `ExtraOptions`):
5289
- * * `enableTracing` makes the router log all its internal events to the console.
5290
- * * `useHash` enables the location strategy that uses the URL fragment instead of the history
5291
- * API.
5292
- * * `initialNavigation` disables the initial navigation.
5293
- * * `errorHandler` provides a custom error handler.
5294
- * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).
5295
- * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See
5296
- * `ExtraOptions` for more details.
5297
- */
5298
- function (routes, config) {
4927
+ RouterModule.forRoot = function (routes, config) {
5299
4928
  return {
5300
4929
  ngModule: RouterModule,
5301
4930
  providers: [
@@ -5327,22 +4956,20 @@ var RouterModule = /** @class */ (function () {
5327
4956
  /**
5328
4957
  * Creates a module with all the router directives and a provider registering routes.
5329
4958
  */
5330
- /**
5331
- * Creates a module with all the router directives and a provider registering routes.
5332
- */
5333
- RouterModule.forChild = /**
5334
- * Creates a module with all the router directives and a provider registering routes.
5335
- */
5336
- function (routes) {
4959
+ RouterModule.forChild = function (routes) {
5337
4960
  return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
5338
4961
  };
5339
4962
  RouterModule.decorators = [
5340
- { type: NgModule, args: [{ declarations: ROUTER_DIRECTIVES, exports: ROUTER_DIRECTIVES },] }
4963
+ { type: NgModule, args: [{
4964
+ declarations: ROUTER_DIRECTIVES,
4965
+ exports: ROUTER_DIRECTIVES,
4966
+ entryComponents: [EmptyOutletComponent]
4967
+ },] }
5341
4968
  ];
5342
4969
  /** @nocollapse */
5343
4970
  RouterModule.ctorParameters = function () { return [
5344
- { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ROUTER_FORROOT_GUARD,] },] },
5345
- { type: Router, decorators: [{ type: Optional },] },
4971
+ { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ROUTER_FORROOT_GUARD,] }] },
4972
+ { type: Router, decorators: [{ type: Optional }] }
5346
4973
  ]; };
5347
4974
  return RouterModule;
5348
4975
  }());
@@ -5433,7 +5060,7 @@ var RouterInitializer = /** @class */ (function () {
5433
5060
  var _this = this;
5434
5061
  var p = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));
5435
5062
  return p.then(function () {
5436
- var resolve = (null);
5063
+ var resolve = null;
5437
5064
  var res = new Promise(function (r) { return resolve = r; });
5438
5065
  var router = _this.injector.get(Router);
5439
5066
  var opts = _this.injector.get(ROUTER_CONFIGURATION);
@@ -5481,7 +5108,7 @@ var RouterInitializer = /** @class */ (function () {
5481
5108
  }
5482
5109
  preloader.setUpPreloading();
5483
5110
  router.resetRootComponentType(ref.componentTypes[0]);
5484
- this.resultOfPreactivationDone.next((null));
5111
+ this.resultOfPreactivationDone.next(null);
5485
5112
  this.resultOfPreactivationDone.complete();
5486
5113
  };
5487
5114
  RouterInitializer.prototype.isLegacyEnabled = function (opts) {
@@ -5496,7 +5123,7 @@ var RouterInitializer = /** @class */ (function () {
5496
5123
  ];
5497
5124
  /** @nocollapse */
5498
5125
  RouterInitializer.ctorParameters = function () { return [
5499
- { type: Injector, },
5126
+ { type: Injector }
5500
5127
  ]; };
5501
5128
  return RouterInitializer;
5502
5129
  }());
@@ -5533,7 +5160,12 @@ function provideRouterInitializer() {
5533
5160
  * Use of this source code is governed by an MIT-style license that can be
5534
5161
  * found in the LICENSE file at https://angular.io/license
5535
5162
  */
5536
- var VERSION = new Version('6.0.3');
5163
+ /**
5164
+ * @module
5165
+ * @description
5166
+ * Entry point for all public APIs of the common package.
5167
+ */
5168
+ var VERSION = new Version('6.0.7');
5537
5169
 
5538
5170
  /**
5539
5171
  * @license
@@ -5558,6 +5190,11 @@ var VERSION = new Version('6.0.3');
5558
5190
  * Use of this source code is governed by an MIT-style license that can be
5559
5191
  * found in the LICENSE file at https://angular.io/license
5560
5192
  */
5193
+ /**
5194
+ * @module
5195
+ * @description
5196
+ * Entry point for all public APIs of this package.
5197
+ */
5561
5198
 
5562
5199
  // This file only reexports content of the `src` folder. Keep it that way.
5563
5200
 
@@ -5568,10 +5205,14 @@ var VERSION = new Version('6.0.3');
5568
5205
  * Use of this source code is governed by an MIT-style license that can be
5569
5206
  * found in the LICENSE file at https://angular.io/license
5570
5207
  */
5208
+ // This file is not used to build this module. It is only used during editing
5209
+ // by the TypeScript language service and during build for verification. `ngc`
5210
+ // replaces this file with production index.ts when it rewrites private symbol
5211
+ // names.
5571
5212
 
5572
5213
  /**
5573
5214
  * Generated bundle index. Do not edit.
5574
5215
  */
5575
5216
 
5576
- export { ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a, RouterInitializer as ɵangular_packages_router_router_g, getAppInitializer as ɵangular_packages_router_router_h, getBootstrapListener as ɵangular_packages_router_router_i, provideForRootGuard as ɵangular_packages_router_router_d, provideLocationStrategy as ɵangular_packages_router_router_c, provideRouterInitializer as ɵangular_packages_router_router_j, rootRoute as ɵangular_packages_router_router_f, routerNgProbeToken as ɵangular_packages_router_router_b, setupRouter as ɵangular_packages_router_router_e, Tree as ɵangular_packages_router_router_k, TreeNode as ɵangular_packages_router_router_l, RouterLink, RouterLinkWithHref, RouterLinkActive, RouterOutlet, ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, RouteReuseStrategy, Router, ROUTES, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule, provideRoutes, ChildrenOutletContexts, OutletContext, NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader, ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot, PRIMARY_OUTLET, convertToParamMap, UrlHandlingStrategy, DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten };
5217
+ export { ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a, RouterInitializer as ɵangular_packages_router_router_g, getAppInitializer as ɵangular_packages_router_router_h, getBootstrapListener as ɵangular_packages_router_router_i, provideForRootGuard as ɵangular_packages_router_router_d, provideLocationStrategy as ɵangular_packages_router_router_c, provideRouterInitializer as ɵangular_packages_router_router_j, rootRoute as ɵangular_packages_router_router_f, routerNgProbeToken as ɵangular_packages_router_router_b, setupRouter as ɵangular_packages_router_router_e, Tree as ɵangular_packages_router_router_k, TreeNode as ɵangular_packages_router_router_l, RouterLink, RouterLinkWithHref, RouterLinkActive, RouterOutlet, ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, RouteReuseStrategy, Router, ROUTES, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule, provideRoutes, ChildrenOutletContexts, OutletContext, NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader, ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot, PRIMARY_OUTLET, convertToParamMap, UrlHandlingStrategy, DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, EmptyOutletComponent as ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten };
5577
5218
  //# sourceMappingURL=router.js.map