@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
@@ -1,5 +1,5 @@
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
  */
@@ -120,8 +120,10 @@ function __spread() {
120
120
  * @experimental
121
121
  */
122
122
  var RouterEvent = /** @class */ (function () {
123
- function RouterEvent(/** @docsNotRequired */
124
- id, /** @docsNotRequired */
123
+ function RouterEvent(
124
+ /** @docsNotRequired */
125
+ id,
126
+ /** @docsNotRequired */
125
127
  url) {
126
128
  this.id = id;
127
129
  this.url = url;
@@ -137,13 +139,13 @@ var RouterEvent = /** @class */ (function () {
137
139
  */
138
140
  var NavigationStart = /** @class */ (function (_super) {
139
141
  __extends(NavigationStart, _super);
140
- function NavigationStart(/** @docsNotRequired */
142
+ function NavigationStart(
141
143
  /** @docsNotRequired */
142
- id, /** @docsNotRequired */
144
+ id,
143
145
  /** @docsNotRequired */
144
- url, /** @docsNotRequired */
146
+ url,
145
147
  /** @docsNotRequired */
146
- navigationTrigger, /** @docsNotRequired */
148
+ navigationTrigger,
147
149
  /** @docsNotRequired */
148
150
  restoredState) {
149
151
  /** @docsNotRequired */
@@ -156,9 +158,7 @@ var NavigationStart = /** @class */ (function (_super) {
156
158
  return _this;
157
159
  }
158
160
  /** @docsNotRequired */
159
- /** @docsNotRequired */
160
- NavigationStart.prototype.toString = /** @docsNotRequired */
161
- function () { return "NavigationStart(id: " + this.id + ", url: '" + this.url + "')"; };
161
+ NavigationStart.prototype.toString = function () { return "NavigationStart(id: " + this.id + ", url: '" + this.url + "')"; };
162
162
  return NavigationStart;
163
163
  }(RouterEvent));
164
164
  /**
@@ -170,20 +170,19 @@ var NavigationStart = /** @class */ (function (_super) {
170
170
  */
171
171
  var NavigationEnd = /** @class */ (function (_super) {
172
172
  __extends(NavigationEnd, _super);
173
- function NavigationEnd(/** @docsNotRequired */
173
+ function NavigationEnd(
174
+ /** @docsNotRequired */
175
+ id,
174
176
  /** @docsNotRequired */
175
- id, /** @docsNotRequired */
177
+ url,
176
178
  /** @docsNotRequired */
177
- url, /** @docsNotRequired */
178
179
  urlAfterRedirects) {
179
180
  var _this = _super.call(this, id, url) || this;
180
181
  _this.urlAfterRedirects = urlAfterRedirects;
181
182
  return _this;
182
183
  }
183
184
  /** @docsNotRequired */
184
- /** @docsNotRequired */
185
- NavigationEnd.prototype.toString = /** @docsNotRequired */
186
- function () {
185
+ NavigationEnd.prototype.toString = function () {
187
186
  return "NavigationEnd(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "')";
188
187
  };
189
188
  return NavigationEnd;
@@ -197,20 +196,19 @@ var NavigationEnd = /** @class */ (function (_super) {
197
196
  */
198
197
  var NavigationCancel = /** @class */ (function (_super) {
199
198
  __extends(NavigationCancel, _super);
200
- function NavigationCancel(/** @docsNotRequired */
199
+ function NavigationCancel(
200
+ /** @docsNotRequired */
201
+ id,
201
202
  /** @docsNotRequired */
202
- id, /** @docsNotRequired */
203
+ url,
203
204
  /** @docsNotRequired */
204
- url, /** @docsNotRequired */
205
205
  reason) {
206
206
  var _this = _super.call(this, id, url) || this;
207
207
  _this.reason = reason;
208
208
  return _this;
209
209
  }
210
210
  /** @docsNotRequired */
211
- /** @docsNotRequired */
212
- NavigationCancel.prototype.toString = /** @docsNotRequired */
213
- function () { return "NavigationCancel(id: " + this.id + ", url: '" + this.url + "')"; };
211
+ NavigationCancel.prototype.toString = function () { return "NavigationCancel(id: " + this.id + ", url: '" + this.url + "')"; };
214
212
  return NavigationCancel;
215
213
  }(RouterEvent));
216
214
  /**
@@ -222,20 +220,19 @@ var NavigationCancel = /** @class */ (function (_super) {
222
220
  */
223
221
  var NavigationError = /** @class */ (function (_super) {
224
222
  __extends(NavigationError, _super);
225
- function NavigationError(/** @docsNotRequired */
223
+ function NavigationError(
224
+ /** @docsNotRequired */
225
+ id,
226
226
  /** @docsNotRequired */
227
- id, /** @docsNotRequired */
227
+ url,
228
228
  /** @docsNotRequired */
229
- url, /** @docsNotRequired */
230
229
  error) {
231
230
  var _this = _super.call(this, id, url) || this;
232
231
  _this.error = error;
233
232
  return _this;
234
233
  }
235
234
  /** @docsNotRequired */
236
- /** @docsNotRequired */
237
- NavigationError.prototype.toString = /** @docsNotRequired */
238
- function () {
235
+ NavigationError.prototype.toString = function () {
239
236
  return "NavigationError(id: " + this.id + ", url: '" + this.url + "', error: " + this.error + ")";
240
237
  };
241
238
  return NavigationError;
@@ -249,12 +246,14 @@ var NavigationError = /** @class */ (function (_super) {
249
246
  */
250
247
  var RoutesRecognized = /** @class */ (function (_super) {
251
248
  __extends(RoutesRecognized, _super);
252
- function RoutesRecognized(/** @docsNotRequired */
249
+ function RoutesRecognized(
250
+ /** @docsNotRequired */
251
+ id,
253
252
  /** @docsNotRequired */
254
- id, /** @docsNotRequired */
253
+ url,
254
+ /** @docsNotRequired */
255
+ urlAfterRedirects,
255
256
  /** @docsNotRequired */
256
- url, /** @docsNotRequired */
257
- urlAfterRedirects, /** @docsNotRequired */
258
257
  state) {
259
258
  var _this = _super.call(this, id, url) || this;
260
259
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -262,9 +261,7 @@ var RoutesRecognized = /** @class */ (function (_super) {
262
261
  return _this;
263
262
  }
264
263
  /** @docsNotRequired */
265
- /** @docsNotRequired */
266
- RoutesRecognized.prototype.toString = /** @docsNotRequired */
267
- function () {
264
+ RoutesRecognized.prototype.toString = function () {
268
265
  return "RoutesRecognized(id: " + this.id + ", url: '" + this.url + "', urlAfterRedirects: '" + this.urlAfterRedirects + "', state: " + this.state + ")";
269
266
  };
270
267
  return RoutesRecognized;
@@ -278,12 +275,14 @@ var RoutesRecognized = /** @class */ (function (_super) {
278
275
  */
279
276
  var GuardsCheckStart = /** @class */ (function (_super) {
280
277
  __extends(GuardsCheckStart, _super);
281
- function GuardsCheckStart(/** @docsNotRequired */
278
+ function GuardsCheckStart(
282
279
  /** @docsNotRequired */
283
- id, /** @docsNotRequired */
280
+ id,
281
+ /** @docsNotRequired */
282
+ url,
283
+ /** @docsNotRequired */
284
+ urlAfterRedirects,
284
285
  /** @docsNotRequired */
285
- url, /** @docsNotRequired */
286
- urlAfterRedirects, /** @docsNotRequired */
287
286
  state) {
288
287
  var _this = _super.call(this, id, url) || this;
289
288
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -304,13 +303,16 @@ var GuardsCheckStart = /** @class */ (function (_super) {
304
303
  */
305
304
  var GuardsCheckEnd = /** @class */ (function (_super) {
306
305
  __extends(GuardsCheckEnd, _super);
307
- function GuardsCheckEnd(/** @docsNotRequired */
306
+ function GuardsCheckEnd(
307
+ /** @docsNotRequired */
308
+ id,
308
309
  /** @docsNotRequired */
309
- id, /** @docsNotRequired */
310
+ url,
311
+ /** @docsNotRequired */
312
+ urlAfterRedirects,
313
+ /** @docsNotRequired */
314
+ state,
310
315
  /** @docsNotRequired */
311
- url, /** @docsNotRequired */
312
- urlAfterRedirects, /** @docsNotRequired */
313
- state, /** @docsNotRequired */
314
316
  shouldActivate) {
315
317
  var _this = _super.call(this, id, url) || this;
316
318
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -335,12 +337,14 @@ var GuardsCheckEnd = /** @class */ (function (_super) {
335
337
  */
336
338
  var ResolveStart = /** @class */ (function (_super) {
337
339
  __extends(ResolveStart, _super);
338
- function ResolveStart(/** @docsNotRequired */
340
+ function ResolveStart(
341
+ /** @docsNotRequired */
342
+ id,
343
+ /** @docsNotRequired */
344
+ url,
339
345
  /** @docsNotRequired */
340
- id, /** @docsNotRequired */
346
+ urlAfterRedirects,
341
347
  /** @docsNotRequired */
342
- url, /** @docsNotRequired */
343
- urlAfterRedirects, /** @docsNotRequired */
344
348
  state) {
345
349
  var _this = _super.call(this, id, url) || this;
346
350
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -362,12 +366,14 @@ var ResolveStart = /** @class */ (function (_super) {
362
366
  */
363
367
  var ResolveEnd = /** @class */ (function (_super) {
364
368
  __extends(ResolveEnd, _super);
365
- function ResolveEnd(/** @docsNotRequired */
369
+ function ResolveEnd(
366
370
  /** @docsNotRequired */
367
- id, /** @docsNotRequired */
371
+ id,
372
+ /** @docsNotRequired */
373
+ url,
374
+ /** @docsNotRequired */
375
+ urlAfterRedirects,
368
376
  /** @docsNotRequired */
369
- url, /** @docsNotRequired */
370
- urlAfterRedirects, /** @docsNotRequired */
371
377
  state) {
372
378
  var _this = _super.call(this, id, url) || this;
373
379
  _this.urlAfterRedirects = urlAfterRedirects;
@@ -387,7 +393,8 @@ var ResolveEnd = /** @class */ (function (_super) {
387
393
  * @experimental
388
394
  */
389
395
  var RouteConfigLoadStart = /** @class */ (function () {
390
- function RouteConfigLoadStart(/** @docsNotRequired */
396
+ function RouteConfigLoadStart(
397
+ /** @docsNotRequired */
391
398
  route) {
392
399
  this.route = route;
393
400
  }
@@ -402,7 +409,8 @@ var RouteConfigLoadStart = /** @class */ (function () {
402
409
  * @experimental
403
410
  */
404
411
  var RouteConfigLoadEnd = /** @class */ (function () {
405
- function RouteConfigLoadEnd(/** @docsNotRequired */
412
+ function RouteConfigLoadEnd(
413
+ /** @docsNotRequired */
406
414
  route) {
407
415
  this.route = route;
408
416
  }
@@ -418,7 +426,8 @@ var RouteConfigLoadEnd = /** @class */ (function () {
418
426
  * @experimental
419
427
  */
420
428
  var ChildActivationStart = /** @class */ (function () {
421
- function ChildActivationStart(/** @docsNotRequired */
429
+ function ChildActivationStart(
430
+ /** @docsNotRequired */
422
431
  snapshot) {
423
432
  this.snapshot = snapshot;
424
433
  }
@@ -437,7 +446,8 @@ var ChildActivationStart = /** @class */ (function () {
437
446
  * @experimental
438
447
  */
439
448
  var ChildActivationEnd = /** @class */ (function () {
440
- function ChildActivationEnd(/** @docsNotRequired */
449
+ function ChildActivationEnd(
450
+ /** @docsNotRequired */
441
451
  snapshot) {
442
452
  this.snapshot = snapshot;
443
453
  }
@@ -456,7 +466,8 @@ var ChildActivationEnd = /** @class */ (function () {
456
466
  * @experimental
457
467
  */
458
468
  var ActivationStart = /** @class */ (function () {
459
- function ActivationStart(/** @docsNotRequired */
469
+ function ActivationStart(
470
+ /** @docsNotRequired */
460
471
  snapshot) {
461
472
  this.snapshot = snapshot;
462
473
  }
@@ -475,7 +486,8 @@ var ActivationStart = /** @class */ (function () {
475
486
  * @experimental
476
487
  */
477
488
  var ActivationEnd = /** @class */ (function () {
478
- function ActivationEnd(/** @docsNotRequired */
489
+ function ActivationEnd(
490
+ /** @docsNotRequired */
479
491
  snapshot) {
480
492
  this.snapshot = snapshot;
481
493
  }
@@ -486,6 +498,31 @@ var ActivationEnd = /** @class */ (function () {
486
498
  return ActivationEnd;
487
499
  }());
488
500
 
501
+ /**
502
+ * @license
503
+ * Copyright Google Inc. All Rights Reserved.
504
+ *
505
+ * Use of this source code is governed by an MIT-style license that can be
506
+ * found in the LICENSE file at https://angular.io/license
507
+ */
508
+ /**
509
+ * This component is used internally within the router to be a placeholder when an empty
510
+ * router-outlet is needed. For example, with a config such as:
511
+ *
512
+ * `{path: 'parent', outlet: 'nav', children: [...]}`
513
+ *
514
+ * In order to render, there needs to be a component on this config, which will default
515
+ * to this `EmptyOutletComponent`.
516
+ */
517
+ var EmptyOutletComponent = /** @class */ (function () {
518
+ function EmptyOutletComponent() {
519
+ }
520
+ EmptyOutletComponent.decorators = [
521
+ { type: core.Component, args: [{ template: "<router-outlet></router-outlet>" }] }
522
+ ];
523
+ return EmptyOutletComponent;
524
+ }());
525
+
489
526
  /**
490
527
  * @license
491
528
  * Copyright Google Inc. All Rights Reserved.
@@ -603,8 +640,9 @@ function validateNode(route, fullPath) {
603
640
  if (Array.isArray(route)) {
604
641
  throw new Error("Invalid configuration of route '" + fullPath + "': Array cannot be specified");
605
642
  }
606
- if (!route.component && (route.outlet && route.outlet !== PRIMARY_OUTLET)) {
607
- throw new Error("Invalid configuration of route '" + fullPath + "': a componentless route cannot have a named outlet set");
643
+ if (!route.component && !route.children && !route.loadChildren &&
644
+ (route.outlet && route.outlet !== PRIMARY_OUTLET)) {
645
+ throw new Error("Invalid configuration of route '" + fullPath + "': a componentless route without children or loadChildren cannot have a named outlet set");
608
646
  }
609
647
  if (route.redirectTo && route.children) {
610
648
  throw new Error("Invalid configuration of route '" + fullPath + "': redirectTo and children cannot be used together");
@@ -658,9 +696,16 @@ function getFullPath(parentPath, currentRoute) {
658
696
  return parentPath + "/" + currentRoute.path;
659
697
  }
660
698
  }
661
- function copyConfig(r) {
662
- var children = r.children && r.children.map(copyConfig);
663
- return children ? __assign({}, r, { children: children }) : __assign({}, r);
699
+ /**
700
+ * Makes a copy of the config and adds any default required properties.
701
+ */
702
+ function standardizeConfig(r) {
703
+ var children = r.children && r.children.map(standardizeConfig);
704
+ var c = children ? __assign({}, r, { children: children }) : __assign({}, r);
705
+ if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {
706
+ c.component = EmptyOutletComponent;
707
+ }
708
+ return c;
664
709
  }
665
710
 
666
711
  /**
@@ -858,9 +903,12 @@ function containsSegmentGroupHelper(container, containee, containeePaths) {
858
903
  */
859
904
  var UrlTree = /** @class */ (function () {
860
905
  /** @internal */
861
- function UrlTree(/** The root segment group of the URL tree */
862
- root, /** The query params of the URL */
863
- queryParams, /** The fragment of the URL */
906
+ function UrlTree(
907
+ /** The root segment group of the URL tree */
908
+ root,
909
+ /** The query params of the URL */
910
+ queryParams,
911
+ /** The fragment of the URL */
864
912
  fragment) {
865
913
  this.root = root;
866
914
  this.queryParams = queryParams;
@@ -877,9 +925,7 @@ var UrlTree = /** @class */ (function () {
877
925
  configurable: true
878
926
  });
879
927
  /** @docsNotRequired */
880
- /** @docsNotRequired */
881
- UrlTree.prototype.toString = /** @docsNotRequired */
882
- function () { return DEFAULT_SERIALIZER.serialize(this); };
928
+ UrlTree.prototype.toString = function () { return DEFAULT_SERIALIZER.serialize(this); };
883
929
  return UrlTree;
884
930
  }());
885
931
  /**
@@ -892,8 +938,10 @@ var UrlTree = /** @class */ (function () {
892
938
  *
893
939
  */
894
940
  var UrlSegmentGroup = /** @class */ (function () {
895
- function UrlSegmentGroup(/** The URL segments of this group. See `UrlSegment` for more information */
896
- segments, /** The list of children of this group */
941
+ function UrlSegmentGroup(
942
+ /** The URL segments of this group. See `UrlSegment` for more information */
943
+ segments,
944
+ /** The list of children of this group */
897
945
  children) {
898
946
  var _this = this;
899
947
  this.segments = segments;
@@ -903,20 +951,15 @@ var UrlSegmentGroup = /** @class */ (function () {
903
951
  forEach(children, function (v, k) { return v.parent = _this; });
904
952
  }
905
953
  /** Whether the segment has child segments */
906
- /** Whether the segment has child segments */
907
- UrlSegmentGroup.prototype.hasChildren = /** Whether the segment has child segments */
908
- function () { return this.numberOfChildren > 0; };
954
+ UrlSegmentGroup.prototype.hasChildren = function () { return this.numberOfChildren > 0; };
909
955
  Object.defineProperty(UrlSegmentGroup.prototype, "numberOfChildren", {
910
956
  /** Number of child segments */
911
- get: /** Number of child segments */
912
- function () { return Object.keys(this.children).length; },
957
+ get: function () { return Object.keys(this.children).length; },
913
958
  enumerable: true,
914
959
  configurable: true
915
960
  });
916
961
  /** @docsNotRequired */
917
- /** @docsNotRequired */
918
- UrlSegmentGroup.prototype.toString = /** @docsNotRequired */
919
- function () { return serializePaths(this); };
962
+ UrlSegmentGroup.prototype.toString = function () { return serializePaths(this); };
920
963
  return UrlSegmentGroup;
921
964
  }());
922
965
  /**
@@ -945,8 +988,10 @@ var UrlSegmentGroup = /** @class */ (function () {
945
988
  *
946
989
  */
947
990
  var UrlSegment = /** @class */ (function () {
948
- function UrlSegment(/** The path part of a URL segment */
949
- path, /** The matrix parameters associated with a segment */
991
+ function UrlSegment(
992
+ /** The path part of a URL segment */
993
+ path,
994
+ /** The matrix parameters associated with a segment */
950
995
  parameters) {
951
996
  this.path = path;
952
997
  this.parameters = parameters;
@@ -962,9 +1007,7 @@ var UrlSegment = /** @class */ (function () {
962
1007
  configurable: true
963
1008
  });
964
1009
  /** @docsNotRequired */
965
- /** @docsNotRequired */
966
- UrlSegment.prototype.toString = /** @docsNotRequired */
967
- function () { return serializePath(this); };
1010
+ UrlSegment.prototype.toString = function () { return serializePath(this); };
968
1011
  return UrlSegment;
969
1012
  }());
970
1013
  function equalSegments(as, bs) {
@@ -1028,19 +1071,15 @@ var DefaultUrlSerializer = /** @class */ (function () {
1028
1071
  function DefaultUrlSerializer() {
1029
1072
  }
1030
1073
  /** Parses a url into a `UrlTree` */
1031
- /** Parses a url into a `UrlTree` */
1032
- DefaultUrlSerializer.prototype.parse = /** Parses a url into a `UrlTree` */
1033
- function (url) {
1074
+ DefaultUrlSerializer.prototype.parse = function (url) {
1034
1075
  var p = new UrlParser(url);
1035
1076
  return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());
1036
1077
  };
1037
1078
  /** Converts a `UrlTree` into a url */
1038
- /** Converts a `UrlTree` into a url */
1039
- DefaultUrlSerializer.prototype.serialize = /** Converts a `UrlTree` into a url */
1040
- function (tree) {
1079
+ DefaultUrlSerializer.prototype.serialize = function (tree) {
1041
1080
  var segment = "/" + serializeSegment(tree.root, true);
1042
1081
  var query = serializeQueryParams(tree.queryParams);
1043
- var fragment = typeof tree.fragment === "string" ? "#" + encodeUriFragment((tree.fragment)) : '';
1082
+ var fragment = typeof tree.fragment === "string" ? "#" + encodeUriFragment(tree.fragment) : '';
1044
1083
  return "" + segment + query + fragment;
1045
1084
  };
1046
1085
  return DefaultUrlSerializer;
@@ -1212,12 +1251,7 @@ var UrlParser = /** @class */ (function () {
1212
1251
  };
1213
1252
  // parse a segment with its matrix parameters
1214
1253
  // ie `name;k1=v1;k2`
1215
- // parse a segment with its matrix parameters
1216
- // ie `name;k1=v1;k2`
1217
- UrlParser.prototype.parseSegment =
1218
- // parse a segment with its matrix parameters
1219
- // ie `name;k1=v1;k2`
1220
- function () {
1254
+ UrlParser.prototype.parseSegment = function () {
1221
1255
  var path = matchSegments(this.remaining);
1222
1256
  if (path === '' && this.peekStartsWith(';')) {
1223
1257
  throw new Error("Empty path url segment cannot have parameters: '" + this.remaining + "'.");
@@ -1249,10 +1283,7 @@ var UrlParser = /** @class */ (function () {
1249
1283
  params[decode(key)] = decode(value);
1250
1284
  };
1251
1285
  // Parse a single query parameter `name[=value]`
1252
- // Parse a single query parameter `name[=value]`
1253
- UrlParser.prototype.parseQueryParam =
1254
- // Parse a single query parameter `name[=value]`
1255
- function (params) {
1286
+ UrlParser.prototype.parseQueryParam = function (params) {
1256
1287
  var key = matchQueryParams(this.remaining);
1257
1288
  if (!key) {
1258
1289
  return;
@@ -1283,10 +1314,7 @@ var UrlParser = /** @class */ (function () {
1283
1314
  }
1284
1315
  };
1285
1316
  // parse `(a/b//outlet_name:c/d)`
1286
- // parse `(a/b//outlet_name:c/d)`
1287
- UrlParser.prototype.parseParens =
1288
- // parse `(a/b//outlet_name:c/d)`
1289
- function (allowPrimary) {
1317
+ UrlParser.prototype.parseParens = function (allowPrimary) {
1290
1318
  var segments = {};
1291
1319
  this.capture('(');
1292
1320
  while (!this.consumeOptional(')') && this.remaining.length > 0) {
@@ -1297,7 +1325,7 @@ var UrlParser = /** @class */ (function () {
1297
1325
  if (next !== '/' && next !== ')' && next !== ';') {
1298
1326
  throw new Error("Cannot parse url '" + this.url + "'");
1299
1327
  }
1300
- var outletName = (undefined);
1328
+ var outletName = undefined;
1301
1329
  if (path.indexOf(':') > -1) {
1302
1330
  outletName = path.substr(0, path.indexOf(':'));
1303
1331
  this.capture(outletName);
@@ -1315,10 +1343,7 @@ var UrlParser = /** @class */ (function () {
1315
1343
  };
1316
1344
  UrlParser.prototype.peekStartsWith = function (str) { return this.remaining.startsWith(str); };
1317
1345
  // Consumes the prefix when it is present and returns whether it has been consumed
1318
- // Consumes the prefix when it is present and returns whether it has been consumed
1319
- UrlParser.prototype.consumeOptional =
1320
- // Consumes the prefix when it is present and returns whether it has been consumed
1321
- function (str) {
1346
+ UrlParser.prototype.consumeOptional = function (str) {
1322
1347
  if (this.peekStartsWith(str)) {
1323
1348
  this.remaining = this.remaining.substring(str.length);
1324
1349
  return true;
@@ -1359,14 +1384,10 @@ function absoluteRedirect(newTree) {
1359
1384
  return new rxjs.Observable(function (obs) { return obs.error(new AbsoluteRedirect(newTree)); });
1360
1385
  }
1361
1386
  function namedOutletsRedirect(redirectTo) {
1362
- return new rxjs.Observable(function (obs) {
1363
- return obs.error(new Error("Only absolute redirects can have named outlets. redirectTo: '" + redirectTo + "'"));
1364
- });
1387
+ return new rxjs.Observable(function (obs) { return obs.error(new Error("Only absolute redirects can have named outlets. redirectTo: '" + redirectTo + "'")); });
1365
1388
  }
1366
1389
  function canLoadFails(route) {
1367
- return new rxjs.Observable(function (obs) {
1368
- return obs.error(navigationCancelingError("Cannot load children because the guard of the route \"path: '" + route.path + "'\" returned false"));
1369
- });
1390
+ return new rxjs.Observable(function (obs) { return obs.error(navigationCancelingError("Cannot load children because the guard of the route \"path: '" + route.path + "'\" returned false")); });
1370
1391
  }
1371
1392
  /**
1372
1393
  * Returns the `UrlTree` with the redirection applied.
@@ -1388,12 +1409,9 @@ var ApplyRedirects = /** @class */ (function () {
1388
1409
  ApplyRedirects.prototype.apply = function () {
1389
1410
  var _this = this;
1390
1411
  var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);
1391
- var urlTrees$ = expanded$.pipe(operators.map(function (rootSegmentGroup) {
1392
- return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, (_this.urlTree.fragment));
1393
- }));
1412
+ var urlTrees$ = expanded$.pipe(operators.map(function (rootSegmentGroup) { return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, _this.urlTree.fragment); }));
1394
1413
  return urlTrees$.pipe(operators.catchError(function (e) {
1395
1414
  if (e instanceof AbsoluteRedirect) {
1396
- // after an absolute redirect we do not apply any more redirects!
1397
1415
  // after an absolute redirect we do not apply any more redirects!
1398
1416
  _this.allowRedirects = false;
1399
1417
  // we need to run matching, so we can fetch all lazy-loaded modules
@@ -1409,7 +1427,7 @@ var ApplyRedirects = /** @class */ (function () {
1409
1427
  var _this = this;
1410
1428
  var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);
1411
1429
  var mapped$ = expanded$.pipe(operators.map(function (rootSegmentGroup) {
1412
- return _this.createUrlTree(rootSegmentGroup, tree.queryParams, (tree.fragment));
1430
+ return _this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment);
1413
1431
  }));
1414
1432
  return mapped$.pipe(operators.catchError(function (e) {
1415
1433
  if (e instanceof NoMatch) {
@@ -1436,10 +1454,7 @@ var ApplyRedirects = /** @class */ (function () {
1436
1454
  return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);
1437
1455
  };
1438
1456
  // Recursively expand segment groups for all the child outlets
1439
- // Recursively expand segment groups for all the child outlets
1440
- ApplyRedirects.prototype.expandChildren =
1441
- // Recursively expand segment groups for all the child outlets
1442
- function (ngModule, routes, segmentGroup) {
1457
+ ApplyRedirects.prototype.expandChildren = function (ngModule, routes, segmentGroup) {
1443
1458
  var _this = this;
1444
1459
  return waitForMap(segmentGroup.children, function (childOutlet, child) { return _this.expandSegmentGroup(ngModule, routes, child, childOutlet); });
1445
1460
  };
@@ -1488,7 +1503,7 @@ var ApplyRedirects = /** @class */ (function () {
1488
1503
  };
1489
1504
  ApplyRedirects.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect = function (ngModule, routes, route, outlet) {
1490
1505
  var _this = this;
1491
- var newTree = this.applyRedirectCommands([], (route.redirectTo), {});
1506
+ var newTree = this.applyRedirectCommands([], route.redirectTo, {});
1492
1507
  if (route.redirectTo.startsWith('/')) {
1493
1508
  return absoluteRedirect(newTree);
1494
1509
  }
@@ -1502,7 +1517,7 @@ var ApplyRedirects = /** @class */ (function () {
1502
1517
  var _a = match(segmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild, positionalParamSegments = _a.positionalParamSegments;
1503
1518
  if (!matched)
1504
1519
  return noMatch(segmentGroup);
1505
- var newTree = this.applyRedirectCommands(consumedSegments, (route.redirectTo), positionalParamSegments);
1520
+ var newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);
1506
1521
  if (route.redirectTo.startsWith('/')) {
1507
1522
  return absoluteRedirect(newTree);
1508
1523
  }
@@ -1577,7 +1592,7 @@ var ApplyRedirects = /** @class */ (function () {
1577
1592
  return rxjs.of(res);
1578
1593
  }
1579
1594
  if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {
1580
- return namedOutletsRedirect((route.redirectTo));
1595
+ return namedOutletsRedirect(route.redirectTo);
1581
1596
  }
1582
1597
  c = c.children[PRIMARY_OUTLET];
1583
1598
  }
@@ -1614,10 +1629,8 @@ var ApplyRedirects = /** @class */ (function () {
1614
1629
  };
1615
1630
  ApplyRedirects.prototype.createSegments = function (redirectTo, redirectToSegments, actualSegments, posParams) {
1616
1631
  var _this = this;
1617
- return redirectToSegments.map(function (s) {
1618
- return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :
1619
- _this.findOrReturn(s, actualSegments);
1620
- });
1632
+ return redirectToSegments.map(function (s) { return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :
1633
+ _this.findOrReturn(s, actualSegments); });
1621
1634
  };
1622
1635
  ApplyRedirects.prototype.findPosParam = function (redirectTo, redirectToUrlSegment, posParams) {
1623
1636
  var pos = posParams[redirectToUrlSegment.path.substring(1)];
@@ -1678,9 +1691,9 @@ function match(segmentGroup, route, segments) {
1678
1691
  }
1679
1692
  return {
1680
1693
  matched: true,
1681
- consumedSegments: (res.consumed),
1682
- lastChild: (res.consumed.length),
1683
- positionalParamSegments: (res.posParams),
1694
+ consumedSegments: res.consumed,
1695
+ lastChild: res.consumed.length,
1696
+ positionalParamSegments: res.posParams,
1684
1697
  };
1685
1698
  }
1686
1699
  function split(segmentGroup, consumedSegments, slicedSegments, config) {
@@ -1779,52 +1792,28 @@ var Tree = /** @class */ (function () {
1779
1792
  /**
1780
1793
  * @internal
1781
1794
  */
1782
- /**
1783
- * @internal
1784
- */
1785
- Tree.prototype.parent = /**
1786
- * @internal
1787
- */
1788
- function (t) {
1795
+ Tree.prototype.parent = function (t) {
1789
1796
  var p = this.pathFromRoot(t);
1790
1797
  return p.length > 1 ? p[p.length - 2] : null;
1791
1798
  };
1792
1799
  /**
1793
1800
  * @internal
1794
1801
  */
1795
- /**
1796
- * @internal
1797
- */
1798
- Tree.prototype.children = /**
1799
- * @internal
1800
- */
1801
- function (t) {
1802
+ Tree.prototype.children = function (t) {
1802
1803
  var n = findNode(t, this._root);
1803
1804
  return n ? n.children.map(function (t) { return t.value; }) : [];
1804
1805
  };
1805
1806
  /**
1806
1807
  * @internal
1807
1808
  */
1808
- /**
1809
- * @internal
1810
- */
1811
- Tree.prototype.firstChild = /**
1812
- * @internal
1813
- */
1814
- function (t) {
1809
+ Tree.prototype.firstChild = function (t) {
1815
1810
  var n = findNode(t, this._root);
1816
1811
  return n && n.children.length > 0 ? n.children[0].value : null;
1817
1812
  };
1818
1813
  /**
1819
1814
  * @internal
1820
1815
  */
1821
- /**
1822
- * @internal
1823
- */
1824
- Tree.prototype.siblings = /**
1825
- * @internal
1826
- */
1827
- function (t) {
1816
+ Tree.prototype.siblings = function (t) {
1828
1817
  var p = findPath(t, this._root);
1829
1818
  if (p.length < 2)
1830
1819
  return [];
@@ -1834,13 +1823,7 @@ var Tree = /** @class */ (function () {
1834
1823
  /**
1835
1824
  * @internal
1836
1825
  */
1837
- /**
1838
- * @internal
1839
- */
1840
- Tree.prototype.pathFromRoot = /**
1841
- * @internal
1842
- */
1843
- function (t) { return findPath(t, this._root).map(function (s) { return s.value; }); };
1826
+ Tree.prototype.pathFromRoot = function (t) { return findPath(t, this._root).map(function (s) { return s.value; }); };
1844
1827
  return Tree;
1845
1828
  }());
1846
1829
  // DFS for the node matching the value
@@ -1943,7 +1926,8 @@ function nodeChildrenAsMap(node) {
1943
1926
  var RouterState = /** @class */ (function (_super) {
1944
1927
  __extends(RouterState, _super);
1945
1928
  /** @internal */
1946
- function RouterState(root, /** The current snapshot of the router state */
1929
+ function RouterState(root,
1930
+ /** The current snapshot of the router state */
1947
1931
  snapshot) {
1948
1932
  var _this = _super.call(this, root) || this;
1949
1933
  _this.snapshot = snapshot;
@@ -1994,13 +1978,20 @@ function createEmptyStateSnapshot(urlTree, rootComponent) {
1994
1978
  */
1995
1979
  var ActivatedRoute = /** @class */ (function () {
1996
1980
  /** @internal */
1997
- function ActivatedRoute(/** An observable of the URL segments matched by this route */
1998
- url, /** An observable of the matrix parameters scoped to this route */
1999
- params, /** An observable of the query parameters shared by all the routes */
2000
- queryParams, /** An observable of the URL fragment shared by all the routes */
2001
- fragment, /** An observable of the static and resolved data of this route. */
2002
- data, /** The outlet name of the route. It's a constant */
2003
- outlet, /** The component of the route. It's a constant */
1981
+ function ActivatedRoute(
1982
+ /** An observable of the URL segments matched by this route */
1983
+ url,
1984
+ /** An observable of the matrix parameters scoped to this route */
1985
+ params,
1986
+ /** An observable of the query parameters shared by all the routes */
1987
+ queryParams,
1988
+ /** An observable of the URL fragment shared by all the routes */
1989
+ fragment,
1990
+ /** An observable of the static and resolved data of this route. */
1991
+ data,
1992
+ /** The outlet name of the route. It's a constant */
1993
+ outlet,
1994
+ /** The component of the route. It's a constant */
2004
1995
  // TODO(vsavkin): remove |string
2005
1996
  component, futureSnapshot) {
2006
1997
  this.url = url;
@@ -2014,43 +2005,37 @@ var ActivatedRoute = /** @class */ (function () {
2014
2005
  }
2015
2006
  Object.defineProperty(ActivatedRoute.prototype, "routeConfig", {
2016
2007
  /** The configuration used to match this route */
2017
- get: /** The configuration used to match this route */
2018
- function () { return this._futureSnapshot.routeConfig; },
2008
+ get: function () { return this._futureSnapshot.routeConfig; },
2019
2009
  enumerable: true,
2020
2010
  configurable: true
2021
2011
  });
2022
2012
  Object.defineProperty(ActivatedRoute.prototype, "root", {
2023
2013
  /** The root of the router state */
2024
- get: /** The root of the router state */
2025
- function () { return this._routerState.root; },
2014
+ get: function () { return this._routerState.root; },
2026
2015
  enumerable: true,
2027
2016
  configurable: true
2028
2017
  });
2029
2018
  Object.defineProperty(ActivatedRoute.prototype, "parent", {
2030
2019
  /** The parent of this route in the router state tree */
2031
- get: /** The parent of this route in the router state tree */
2032
- function () { return this._routerState.parent(this); },
2020
+ get: function () { return this._routerState.parent(this); },
2033
2021
  enumerable: true,
2034
2022
  configurable: true
2035
2023
  });
2036
2024
  Object.defineProperty(ActivatedRoute.prototype, "firstChild", {
2037
2025
  /** The first child of this route in the router state tree */
2038
- get: /** The first child of this route in the router state tree */
2039
- function () { return this._routerState.firstChild(this); },
2026
+ get: function () { return this._routerState.firstChild(this); },
2040
2027
  enumerable: true,
2041
2028
  configurable: true
2042
2029
  });
2043
2030
  Object.defineProperty(ActivatedRoute.prototype, "children", {
2044
2031
  /** The children of this route in the router state tree */
2045
- get: /** The children of this route in the router state tree */
2046
- function () { return this._routerState.children(this); },
2032
+ get: function () { return this._routerState.children(this); },
2047
2033
  enumerable: true,
2048
2034
  configurable: true
2049
2035
  });
2050
2036
  Object.defineProperty(ActivatedRoute.prototype, "pathFromRoot", {
2051
2037
  /** The path from the root of the router state tree to this route */
2052
- get: /** The path from the root of the router state tree to this route */
2053
- function () { return this._routerState.pathFromRoot(this); },
2038
+ get: function () { return this._routerState.pathFromRoot(this); },
2054
2039
  enumerable: true,
2055
2040
  configurable: true
2056
2041
  });
@@ -2140,13 +2125,20 @@ function flattenInherited(pathFromRoot) {
2140
2125
  */
2141
2126
  var ActivatedRouteSnapshot = /** @class */ (function () {
2142
2127
  /** @internal */
2143
- function ActivatedRouteSnapshot(/** The URL segments matched by this route */
2144
- url, /** The matrix parameters scoped to this route */
2145
- params, /** The query parameters shared by all the routes */
2146
- queryParams, /** The URL fragment shared by all the routes */
2147
- fragment, /** The static and resolved data of this route */
2148
- data, /** The outlet name of the route */
2149
- outlet, /** The component of the route */
2128
+ function ActivatedRouteSnapshot(
2129
+ /** The URL segments matched by this route */
2130
+ url,
2131
+ /** The matrix parameters scoped to this route */
2132
+ params,
2133
+ /** The query parameters shared by all the routes */
2134
+ queryParams,
2135
+ /** The URL fragment shared by all the routes */
2136
+ fragment,
2137
+ /** The static and resolved data of this route */
2138
+ data,
2139
+ /** The outlet name of the route */
2140
+ outlet,
2141
+ /** The component of the route */
2150
2142
  component, routeConfig, urlSegment, lastPathIndex, resolve) {
2151
2143
  this.url = url;
2152
2144
  this.params = params;
@@ -2162,36 +2154,31 @@ var ActivatedRouteSnapshot = /** @class */ (function () {
2162
2154
  }
2163
2155
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "root", {
2164
2156
  /** The root of the router state */
2165
- get: /** The root of the router state */
2166
- function () { return this._routerState.root; },
2157
+ get: function () { return this._routerState.root; },
2167
2158
  enumerable: true,
2168
2159
  configurable: true
2169
2160
  });
2170
2161
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "parent", {
2171
2162
  /** The parent of this route in the router state tree */
2172
- get: /** The parent of this route in the router state tree */
2173
- function () { return this._routerState.parent(this); },
2163
+ get: function () { return this._routerState.parent(this); },
2174
2164
  enumerable: true,
2175
2165
  configurable: true
2176
2166
  });
2177
2167
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "firstChild", {
2178
2168
  /** The first child of this route in the router state tree */
2179
- get: /** The first child of this route in the router state tree */
2180
- function () { return this._routerState.firstChild(this); },
2169
+ get: function () { return this._routerState.firstChild(this); },
2181
2170
  enumerable: true,
2182
2171
  configurable: true
2183
2172
  });
2184
2173
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "children", {
2185
2174
  /** The children of this route in the router state tree */
2186
- get: /** The children of this route in the router state tree */
2187
- function () { return this._routerState.children(this); },
2175
+ get: function () { return this._routerState.children(this); },
2188
2176
  enumerable: true,
2189
2177
  configurable: true
2190
2178
  });
2191
2179
  Object.defineProperty(ActivatedRouteSnapshot.prototype, "pathFromRoot", {
2192
2180
  /** The path from the root of the router state tree to this route */
2193
- get: /** The path from the root of the router state tree to this route */
2194
- function () { return this._routerState.pathFromRoot(this); },
2181
+ get: function () { return this._routerState.pathFromRoot(this); },
2195
2182
  enumerable: true,
2196
2183
  configurable: true
2197
2184
  });
@@ -2251,7 +2238,8 @@ var ActivatedRouteSnapshot = /** @class */ (function () {
2251
2238
  var RouterStateSnapshot = /** @class */ (function (_super) {
2252
2239
  __extends(RouterStateSnapshot, _super);
2253
2240
  /** @internal */
2254
- function RouterStateSnapshot(/** The url from which this snapshot was created */
2241
+ function RouterStateSnapshot(
2242
+ /** The url from which this snapshot was created */
2255
2243
  url, root) {
2256
2244
  var _this = _super.call(this, root) || this;
2257
2245
  _this.url = url;
@@ -2298,7 +2286,6 @@ function advanceActivatedRoute(route) {
2298
2286
  else {
2299
2287
  route.snapshot = route._futureSnapshot;
2300
2288
  // this is for resolved data
2301
- // this is for resolved data
2302
2289
  route.data.next(route._futureSnapshot.data);
2303
2290
  }
2304
2291
  }
@@ -2306,7 +2293,7 @@ function equalParamsAndUrlSegments(a, b) {
2306
2293
  var equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);
2307
2294
  var parentsMismatch = !a.parent !== !b.parent;
2308
2295
  return equalUrlParams && !parentsMismatch &&
2309
- (!a.parent || equalParamsAndUrlSegments(a.parent, (b.parent)));
2296
+ (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));
2310
2297
  }
2311
2298
 
2312
2299
  /**
@@ -2475,11 +2462,9 @@ function computeNavigation(commands) {
2475
2462
  // skip './a'
2476
2463
  }
2477
2464
  else if (partIndex == 0 && urlPart === '') {
2478
- // '/a'
2479
2465
  isAbsolute = true;
2480
2466
  }
2481
2467
  else if (urlPart === '..') {
2482
- // '../a'
2483
2468
  numberOfDoubleDots++;
2484
2469
  }
2485
2470
  else if (urlPart != '') {
@@ -2517,7 +2502,7 @@ function createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {
2517
2502
  var dd = numberOfDoubleDots;
2518
2503
  while (dd > ci) {
2519
2504
  dd -= ci;
2520
- g = (g.parent);
2505
+ g = g.parent;
2521
2506
  if (!g) {
2522
2507
  throw new Error('Invalid number of \'../\'');
2523
2508
  }
@@ -2718,15 +2703,7 @@ var PreActivation = /** @class */ (function () {
2718
2703
  * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2719
2704
  * proper state to run `checkGuards()` method.
2720
2705
  */
2721
- /**
2722
- * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2723
- * proper state to run `checkGuards()` method.
2724
- */
2725
- PreActivation.prototype.setupChildRouteGuards = /**
2726
- * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2727
- * proper state to run `checkGuards()` method.
2728
- */
2729
- function (futureNode, currNode, contexts, futurePath) {
2706
+ PreActivation.prototype.setupChildRouteGuards = function (futureNode, currNode, contexts, futurePath) {
2730
2707
  var _this = this;
2731
2708
  var prevChildren = nodeChildrenAsMap(currNode);
2732
2709
  // Process the children of the future route
@@ -2743,15 +2720,7 @@ var PreActivation = /** @class */ (function () {
2743
2720
  * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2744
2721
  * proper state to run `checkGuards()` method.
2745
2722
  */
2746
- /**
2747
- * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2748
- * proper state to run `checkGuards()` method.
2749
- */
2750
- PreActivation.prototype.setupRouteGuards = /**
2751
- * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in
2752
- * proper state to run `checkGuards()` method.
2753
- */
2754
- function (futureNode, currNode, parentContexts, futurePath) {
2723
+ PreActivation.prototype.setupRouteGuards = function (futureNode, currNode, parentContexts, futurePath) {
2755
2724
  var future = futureNode.value;
2756
2725
  var curr = currNode ? currNode.value : null;
2757
2726
  var context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;
@@ -2775,7 +2744,7 @@ var PreActivation = /** @class */ (function () {
2775
2744
  this.setupChildRouteGuards(futureNode, currNode, parentContexts, futurePath);
2776
2745
  }
2777
2746
  if (shouldRunGuardsAndResolvers) {
2778
- var outlet = (context.outlet);
2747
+ var outlet = context.outlet;
2779
2748
  this.canDeactivateChecks.push(new CanDeactivate(outlet.component, curr));
2780
2749
  }
2781
2750
  }
@@ -2839,13 +2808,11 @@ var PreActivation = /** @class */ (function () {
2839
2808
  PreActivation.prototype.runCanActivateChecks = function () {
2840
2809
  var _this = this;
2841
2810
  return rxjs.from(this.canActivateChecks)
2842
- .pipe(operators.concatMap(function (check) {
2843
- return andObservables(rxjs.from([
2844
- _this.fireChildActivationStart(check.route.parent),
2845
- _this.fireActivationStart(check.route), _this.runCanActivateChild(check.path),
2846
- _this.runCanActivate(check.route)
2847
- ]));
2848
- }), operators.every(function (result) { return result === true; }));
2811
+ .pipe(operators.concatMap(function (check) { return andObservables(rxjs.from([
2812
+ _this.fireChildActivationStart(check.route.parent),
2813
+ _this.fireActivationStart(check.route), _this.runCanActivateChild(check.path),
2814
+ _this.runCanActivate(check.route)
2815
+ ])); }), operators.every(function (result) { return result === true; }));
2849
2816
  // this.fireChildActivationStart(check.path),
2850
2817
  };
2851
2818
  /**
@@ -2856,23 +2823,7 @@ var PreActivation = /** @class */ (function () {
2856
2823
  * return
2857
2824
  * `true` so checks continue to run.
2858
2825
  */
2859
- /**
2860
- * This should fire off `ActivationStart` events for each route being activated at this
2861
- * level.
2862
- * In other words, if you're activating `a` and `b` below, `path` will contain the
2863
- * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always
2864
- * return
2865
- * `true` so checks continue to run.
2866
- */
2867
- PreActivation.prototype.fireActivationStart = /**
2868
- * This should fire off `ActivationStart` events for each route being activated at this
2869
- * level.
2870
- * In other words, if you're activating `a` and `b` below, `path` will contain the
2871
- * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always
2872
- * return
2873
- * `true` so checks continue to run.
2874
- */
2875
- function (snapshot) {
2826
+ PreActivation.prototype.fireActivationStart = function (snapshot) {
2876
2827
  if (snapshot !== null && this.forwardEvent) {
2877
2828
  this.forwardEvent(new ActivationStart(snapshot));
2878
2829
  }
@@ -2886,23 +2837,7 @@ var PreActivation = /** @class */ (function () {
2886
2837
  * return
2887
2838
  * `true` so checks continue to run.
2888
2839
  */
2889
- /**
2890
- * This should fire off `ChildActivationStart` events for each route being activated at this
2891
- * level.
2892
- * In other words, if you're activating `a` and `b` below, `path` will contain the
2893
- * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always
2894
- * return
2895
- * `true` so checks continue to run.
2896
- */
2897
- PreActivation.prototype.fireChildActivationStart = /**
2898
- * This should fire off `ChildActivationStart` events for each route being activated at this
2899
- * level.
2900
- * In other words, if you're activating `a` and `b` below, `path` will contain the
2901
- * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always
2902
- * return
2903
- * `true` so checks continue to run.
2904
- */
2905
- function (snapshot) {
2840
+ PreActivation.prototype.fireChildActivationStart = function (snapshot) {
2906
2841
  if (snapshot !== null && this.forwardEvent) {
2907
2842
  this.forwardEvent(new ChildActivationStart(snapshot));
2908
2843
  }
@@ -3055,7 +2990,7 @@ var Recognizer = /** @class */ (function () {
3055
2990
  try {
3056
2991
  var rootSegmentGroup = split$1(this.urlTree.root, [], [], this.config).segmentGroup;
3057
2992
  var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);
3058
- var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(__assign({}, this.urlTree.queryParams)), (this.urlTree.fragment), {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});
2993
+ var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});
3059
2994
  var rootNode = new TreeNode(root, children);
3060
2995
  var routeState = new RouterStateSnapshot(this.url, rootNode);
3061
2996
  this.inheritParamsAndData(routeState._root);
@@ -3125,13 +3060,13 @@ var Recognizer = /** @class */ (function () {
3125
3060
  var rawSlicedSegments = [];
3126
3061
  if (route.path === '**') {
3127
3062
  var params = segments.length > 0 ? last$1(segments).parameters : {};
3128
- 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));
3063
+ 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));
3129
3064
  }
3130
3065
  else {
3131
3066
  var result = match$1(rawSegment, route, segments);
3132
3067
  consumedSegments = result.consumedSegments;
3133
3068
  rawSlicedSegments = segments.slice(result.lastChild);
3134
- 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));
3069
+ 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));
3135
3070
  }
3136
3071
  var childConfig = getChildConfig(route);
3137
3072
  var _a = split$1(rawSegment, consumedSegments, rawSlicedSegments, childConfig), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;
@@ -3177,7 +3112,7 @@ function match$1(segmentGroup, route, segments) {
3177
3112
  if (!res)
3178
3113
  throw new NoMatch$1();
3179
3114
  var posParams = {};
3180
- forEach((res.posParams), function (v, k) { posParams[k] = v.path; });
3115
+ forEach(res.posParams, function (v, k) { posParams[k] = v.path; });
3181
3116
  var parameters = res.consumed.length > 0 ? __assign({}, posParams, res.consumed[res.consumed.length - 1].parameters) :
3182
3117
  posParams;
3183
3118
  return { consumedSegments: res.consumed, lastChild: res.consumed.length, parameters: parameters };
@@ -3343,6 +3278,7 @@ var DefaultRouteReuseStrategy = /** @class */ (function () {
3343
3278
  * Use of this source code is governed by an MIT-style license that can be
3344
3279
  * found in the LICENSE file at https://angular.io/license
3345
3280
  */
3281
+ // TODO(i): switch to fromPromise once it's expored in rxjs
3346
3282
  /**
3347
3283
  * @docsNotRequired
3348
3284
  * @experimental
@@ -3360,13 +3296,13 @@ var RouterConfigLoader = /** @class */ (function () {
3360
3296
  if (this.onLoadStartListener) {
3361
3297
  this.onLoadStartListener(route);
3362
3298
  }
3363
- var moduleFactory$ = this.loadModuleFactory((route.loadChildren));
3299
+ var moduleFactory$ = this.loadModuleFactory(route.loadChildren);
3364
3300
  return moduleFactory$.pipe(operators.map(function (factory) {
3365
3301
  if (_this.onLoadEndListener) {
3366
3302
  _this.onLoadEndListener(route);
3367
3303
  }
3368
3304
  var module = factory.create(parentInjector);
3369
- return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(copyConfig), module);
3305
+ return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);
3370
3306
  }));
3371
3307
  };
3372
3308
  RouterConfigLoader.prototype.loadModuleFactory = function (loadChildren) {
@@ -3458,49 +3394,49 @@ var Router = /** @class */ (function () {
3458
3394
  this.rootContexts = rootContexts;
3459
3395
  this.location = location;
3460
3396
  this.config = config;
3461
- this.navigations = new rxjs.BehaviorSubject((null));
3397
+ this.navigations = new rxjs.BehaviorSubject(null);
3462
3398
  this.navigationId = 0;
3463
3399
  this.events = new rxjs.Subject();
3464
3400
  /**
3465
- * Error handler that is invoked when a navigation errors.
3466
- *
3467
- * See `ErrorHandler` for more information.
3468
- */
3401
+ * Error handler that is invoked when a navigation errors.
3402
+ *
3403
+ * See `ErrorHandler` for more information.
3404
+ */
3469
3405
  this.errorHandler = defaultErrorHandler;
3470
3406
  /**
3471
- * Indicates if at least one navigation happened.
3472
- */
3407
+ * Indicates if at least one navigation happened.
3408
+ */
3473
3409
  this.navigated = false;
3474
3410
  this.lastSuccessfulId = -1;
3475
3411
  /**
3476
- * Used by RouterModule. This allows us to
3477
- * pause the navigation either before preactivation or after it.
3478
- * @internal
3479
- */
3412
+ * Used by RouterModule. This allows us to
3413
+ * pause the navigation either before preactivation or after it.
3414
+ * @internal
3415
+ */
3480
3416
  this.hooks = {
3481
3417
  beforePreactivation: defaultRouterHook,
3482
3418
  afterPreactivation: defaultRouterHook
3483
3419
  };
3484
3420
  /**
3485
- * Extracts and merges URLs. Used for AngularJS to Angular migrations.
3486
- */
3421
+ * Extracts and merges URLs. Used for AngularJS to Angular migrations.
3422
+ */
3487
3423
  this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();
3488
3424
  this.routeReuseStrategy = new DefaultRouteReuseStrategy();
3489
3425
  /**
3490
- * Define what the router should do if it receives a navigation request to the current URL.
3491
- * By default, the router will ignore this navigation. However, this prevents features such
3492
- * as a "refresh" button. Use this option to configure the behavior when navigating to the
3493
- * current URL. Default is 'ignore'.
3494
- */
3426
+ * Define what the router should do if it receives a navigation request to the current URL.
3427
+ * By default, the router will ignore this navigation. However, this prevents features such
3428
+ * as a "refresh" button. Use this option to configure the behavior when navigating to the
3429
+ * current URL. Default is 'ignore'.
3430
+ */
3495
3431
  this.onSameUrlNavigation = 'ignore';
3496
3432
  /**
3497
- * Defines how the router merges params, data and resolved data from parent to child
3498
- * routes. Available options are:
3499
- *
3500
- * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less
3501
- * routes.
3502
- * - `'always'`, enables unconditional inheritance of parent params.
3503
- */
3433
+ * Defines how the router merges params, data and resolved data from parent to child
3434
+ * routes. Available options are:
3435
+ *
3436
+ * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less
3437
+ * routes.
3438
+ * - `'always'`, enables unconditional inheritance of parent params.
3439
+ */
3504
3440
  this.paramsInheritanceStrategy = 'emptyOnly';
3505
3441
  var onLoadStart = function (r) { return _this.triggerEvent(new RouteConfigLoadStart(r)); };
3506
3442
  var onLoadEnd = function (r) { return _this.triggerEvent(new RouteConfigLoadEnd(r)); };
@@ -3516,15 +3452,7 @@ var Router = /** @class */ (function () {
3516
3452
  * @internal
3517
3453
  * TODO: this should be removed once the constructor of the router made internal
3518
3454
  */
3519
- /**
3520
- * @internal
3521
- * TODO: this should be removed once the constructor of the router made internal
3522
- */
3523
- Router.prototype.resetRootComponentType = /**
3524
- * @internal
3525
- * TODO: this should be removed once the constructor of the router made internal
3526
- */
3527
- function (rootComponentType) {
3455
+ Router.prototype.resetRootComponentType = function (rootComponentType) {
3528
3456
  this.rootComponentType = rootComponentType;
3529
3457
  // TODO: vsavkin router 4.0 should make the root component set to null
3530
3458
  // this will simplify the lifecycle of the router.
@@ -3533,13 +3461,7 @@ var Router = /** @class */ (function () {
3533
3461
  /**
3534
3462
  * Sets up the location change listener and performs the initial navigation.
3535
3463
  */
3536
- /**
3537
- * Sets up the location change listener and performs the initial navigation.
3538
- */
3539
- Router.prototype.initialNavigation = /**
3540
- * Sets up the location change listener and performs the initial navigation.
3541
- */
3542
- function () {
3464
+ Router.prototype.initialNavigation = function () {
3543
3465
  this.setUpLocationChangeListener();
3544
3466
  if (this.navigationId === 0) {
3545
3467
  this.navigateByUrl(this.location.path(true), { replaceUrl: true });
@@ -3548,13 +3470,7 @@ var Router = /** @class */ (function () {
3548
3470
  /**
3549
3471
  * Sets up the location change listener.
3550
3472
  */
3551
- /**
3552
- * Sets up the location change listener.
3553
- */
3554
- Router.prototype.setUpLocationChangeListener = /**
3555
- * Sets up the location change listener.
3556
- */
3557
- function () {
3473
+ Router.prototype.setUpLocationChangeListener = function () {
3558
3474
  var _this = this;
3559
3475
  // Don't need to use Zone.wrap any more, because zone.js
3560
3476
  // already patch onPopState, so location change callback will
@@ -3572,15 +3488,12 @@ var Router = /** @class */ (function () {
3572
3488
  };
3573
3489
  Object.defineProperty(Router.prototype, "url", {
3574
3490
  /** The current url */
3575
- get: /** The current url */
3576
- function () { return this.serializeUrl(this.currentUrlTree); },
3491
+ get: function () { return this.serializeUrl(this.currentUrlTree); },
3577
3492
  enumerable: true,
3578
3493
  configurable: true
3579
3494
  });
3580
3495
  /** @internal */
3581
- /** @internal */
3582
- Router.prototype.triggerEvent = /** @internal */
3583
- function (e) { this.events.next(e); };
3496
+ Router.prototype.triggerEvent = function (e) { this.events.next(e); };
3584
3497
  /**
3585
3498
  * Resets the configuration used for navigation and generating links.
3586
3499
  *
@@ -3595,51 +3508,19 @@ var Router = /** @class */ (function () {
3595
3508
  * ]);
3596
3509
  * ```
3597
3510
  */
3598
- /**
3599
- * Resets the configuration used for navigation and generating links.
3600
- *
3601
- * ### Usage
3602
- *
3603
- * ```
3604
- * router.resetConfig([
3605
- * { path: 'team/:id', component: TeamCmp, children: [
3606
- * { path: 'simple', component: SimpleCmp },
3607
- * { path: 'user/:name', component: UserCmp }
3608
- * ]}
3609
- * ]);
3610
- * ```
3611
- */
3612
- Router.prototype.resetConfig = /**
3613
- * Resets the configuration used for navigation and generating links.
3614
- *
3615
- * ### Usage
3616
- *
3617
- * ```
3618
- * router.resetConfig([
3619
- * { path: 'team/:id', component: TeamCmp, children: [
3620
- * { path: 'simple', component: SimpleCmp },
3621
- * { path: 'user/:name', component: UserCmp }
3622
- * ]}
3623
- * ]);
3624
- * ```
3625
- */
3626
- function (config) {
3511
+ Router.prototype.resetConfig = function (config) {
3627
3512
  validateConfig(config);
3628
- this.config = config.map(copyConfig);
3513
+ this.config = config.map(standardizeConfig);
3629
3514
  this.navigated = false;
3630
3515
  this.lastSuccessfulId = -1;
3631
3516
  };
3632
3517
  /** @docsNotRequired */
3633
- /** @docsNotRequired */
3634
- Router.prototype.ngOnDestroy = /** @docsNotRequired */
3635
- function () { this.dispose(); };
3518
+ Router.prototype.ngOnDestroy = function () { this.dispose(); };
3636
3519
  /** Disposes of the router */
3637
- /** Disposes of the router */
3638
- Router.prototype.dispose = /** Disposes of the router */
3639
- function () {
3520
+ Router.prototype.dispose = function () {
3640
3521
  if (this.locationSubscription) {
3641
3522
  this.locationSubscription.unsubscribe();
3642
- this.locationSubscription = (null);
3523
+ this.locationSubscription = null;
3643
3524
  }
3644
3525
  };
3645
3526
  /**
@@ -3683,89 +3564,7 @@ var Router = /** @class */ (function () {
3683
3564
  * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
3684
3565
  * ```
3685
3566
  */
3686
- /**
3687
- * Applies an array of commands to the current url tree and creates a new url tree.
3688
- *
3689
- * When given an activate route, applies the given commands starting from the route.
3690
- * When not given a route, applies the given command starting from the root.
3691
- *
3692
- * ### Usage
3693
- *
3694
- * ```
3695
- * // create /team/33/user/11
3696
- * router.createUrlTree(['/team', 33, 'user', 11]);
3697
- *
3698
- * // create /team/33;expand=true/user/11
3699
- * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);
3700
- *
3701
- * // you can collapse static segments like this (this works only with the first passed-in value):
3702
- * router.createUrlTree(['/team/33/user', userId]);
3703
- *
3704
- * // If the first segment can contain slashes, and you do not want the router to split it, you
3705
- * // can do the following:
3706
- *
3707
- * router.createUrlTree([{segmentPath: '/one/two'}]);
3708
- *
3709
- * // create /team/33/(user/11//right:chat)
3710
- * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);
3711
- *
3712
- * // remove the right secondary node
3713
- * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);
3714
- *
3715
- * // assuming the current url is `/team/33/user/11` and the route points to `user/11`
3716
- *
3717
- * // navigate to /team/33/user/11/details
3718
- * router.createUrlTree(['details'], {relativeTo: route});
3719
- *
3720
- * // navigate to /team/33/user/22
3721
- * router.createUrlTree(['../22'], {relativeTo: route});
3722
- *
3723
- * // navigate to /team/44/user/22
3724
- * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
3725
- * ```
3726
- */
3727
- Router.prototype.createUrlTree = /**
3728
- * Applies an array of commands to the current url tree and creates a new url tree.
3729
- *
3730
- * When given an activate route, applies the given commands starting from the route.
3731
- * When not given a route, applies the given command starting from the root.
3732
- *
3733
- * ### Usage
3734
- *
3735
- * ```
3736
- * // create /team/33/user/11
3737
- * router.createUrlTree(['/team', 33, 'user', 11]);
3738
- *
3739
- * // create /team/33;expand=true/user/11
3740
- * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);
3741
- *
3742
- * // you can collapse static segments like this (this works only with the first passed-in value):
3743
- * router.createUrlTree(['/team/33/user', userId]);
3744
- *
3745
- * // If the first segment can contain slashes, and you do not want the router to split it, you
3746
- * // can do the following:
3747
- *
3748
- * router.createUrlTree([{segmentPath: '/one/two'}]);
3749
- *
3750
- * // create /team/33/(user/11//right:chat)
3751
- * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);
3752
- *
3753
- * // remove the right secondary node
3754
- * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);
3755
- *
3756
- * // assuming the current url is `/team/33/user/11` and the route points to `user/11`
3757
- *
3758
- * // navigate to /team/33/user/11/details
3759
- * router.createUrlTree(['details'], {relativeTo: route});
3760
- *
3761
- * // navigate to /team/33/user/22
3762
- * router.createUrlTree(['../22'], {relativeTo: route});
3763
- *
3764
- * // navigate to /team/44/user/22
3765
- * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
3766
- * ```
3767
- */
3768
- function (commands, navigationExtras) {
3567
+ Router.prototype.createUrlTree = function (commands, navigationExtras) {
3769
3568
  if (navigationExtras === void 0) { navigationExtras = {}; }
3770
3569
  var relativeTo = navigationExtras.relativeTo, queryParams = navigationExtras.queryParams, fragment = navigationExtras.fragment, preserveQueryParams = navigationExtras.preserveQueryParams, queryParamsHandling = navigationExtras.queryParamsHandling, preserveFragment = navigationExtras.preserveFragment;
3771
3570
  if (core.isDevMode() && preserveQueryParams && console && console.warn) {
@@ -3792,7 +3591,7 @@ var Router = /** @class */ (function () {
3792
3591
  if (q !== null) {
3793
3592
  q = this.removeEmptyProps(q);
3794
3593
  }
3795
- return createUrlTree(a, this.currentUrlTree, commands, (q), (f));
3594
+ return createUrlTree(a, this.currentUrlTree, commands, q, f);
3796
3595
  };
3797
3596
  /**
3798
3597
  * Navigate based on the provided url. This navigation is always absolute.
@@ -3814,47 +3613,7 @@ var Router = /** @class */ (function () {
3814
3613
  * In opposite to `navigate`, `navigateByUrl` takes a whole URL
3815
3614
  * and does not apply any delta to the current one.
3816
3615
  */
3817
- /**
3818
- * Navigate based on the provided url. This navigation is always absolute.
3819
- *
3820
- * Returns a promise that:
3821
- * - resolves to 'true' when navigation succeeds,
3822
- * - resolves to 'false' when navigation fails,
3823
- * - is rejected when an error happens.
3824
- *
3825
- * ### Usage
3826
- *
3827
- * ```
3828
- * router.navigateByUrl("/team/33/user/11");
3829
- *
3830
- * // Navigate without updating the URL
3831
- * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
3832
- * ```
3833
- *
3834
- * In opposite to `navigate`, `navigateByUrl` takes a whole URL
3835
- * and does not apply any delta to the current one.
3836
- */
3837
- Router.prototype.navigateByUrl = /**
3838
- * Navigate based on the provided url. This navigation is always absolute.
3839
- *
3840
- * Returns a promise that:
3841
- * - resolves to 'true' when navigation succeeds,
3842
- * - resolves to 'false' when navigation fails,
3843
- * - is rejected when an error happens.
3844
- *
3845
- * ### Usage
3846
- *
3847
- * ```
3848
- * router.navigateByUrl("/team/33/user/11");
3849
- *
3850
- * // Navigate without updating the URL
3851
- * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
3852
- * ```
3853
- *
3854
- * In opposite to `navigate`, `navigateByUrl` takes a whole URL
3855
- * and does not apply any delta to the current one.
3856
- */
3857
- function (url, extras) {
3616
+ Router.prototype.navigateByUrl = function (url, extras) {
3858
3617
  if (extras === void 0) { extras = { skipLocationChange: false }; }
3859
3618
  var urlTree = url instanceof UrlTree ? url : this.parseUrl(url);
3860
3619
  var mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);
@@ -3881,65 +3640,17 @@ var Router = /** @class */ (function () {
3881
3640
  * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current
3882
3641
  * URL.
3883
3642
  */
3884
- /**
3885
- * Navigate based on the provided array of commands and a starting point.
3886
- * If no starting route is provided, the navigation is absolute.
3887
- *
3888
- * Returns a promise that:
3889
- * - resolves to 'true' when navigation succeeds,
3890
- * - resolves to 'false' when navigation fails,
3891
- * - is rejected when an error happens.
3892
- *
3893
- * ### Usage
3894
- *
3895
- * ```
3896
- * router.navigate(['team', 33, 'user', 11], {relativeTo: route});
3897
- *
3898
- * // Navigate without updating the URL
3899
- * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});
3900
- * ```
3901
- *
3902
- * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current
3903
- * URL.
3904
- */
3905
- Router.prototype.navigate = /**
3906
- * Navigate based on the provided array of commands and a starting point.
3907
- * If no starting route is provided, the navigation is absolute.
3908
- *
3909
- * Returns a promise that:
3910
- * - resolves to 'true' when navigation succeeds,
3911
- * - resolves to 'false' when navigation fails,
3912
- * - is rejected when an error happens.
3913
- *
3914
- * ### Usage
3915
- *
3916
- * ```
3917
- * router.navigate(['team', 33, 'user', 11], {relativeTo: route});
3918
- *
3919
- * // Navigate without updating the URL
3920
- * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});
3921
- * ```
3922
- *
3923
- * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current
3924
- * URL.
3925
- */
3926
- function (commands, extras) {
3643
+ Router.prototype.navigate = function (commands, extras) {
3927
3644
  if (extras === void 0) { extras = { skipLocationChange: false }; }
3928
3645
  validateCommands(commands);
3929
3646
  return this.navigateByUrl(this.createUrlTree(commands, extras), extras);
3930
3647
  };
3931
3648
  /** Serializes a `UrlTree` into a string */
3932
- /** Serializes a `UrlTree` into a string */
3933
- Router.prototype.serializeUrl = /** Serializes a `UrlTree` into a string */
3934
- function (url) { return this.urlSerializer.serialize(url); };
3649
+ Router.prototype.serializeUrl = function (url) { return this.urlSerializer.serialize(url); };
3935
3650
  /** Parses a string into a `UrlTree` */
3936
- /** Parses a string into a `UrlTree` */
3937
- Router.prototype.parseUrl = /** Parses a string into a `UrlTree` */
3938
- function (url) { return this.urlSerializer.parse(url); };
3939
- /** Returns whether the url is activated */
3651
+ Router.prototype.parseUrl = function (url) { return this.urlSerializer.parse(url); };
3940
3652
  /** Returns whether the url is activated */
3941
- Router.prototype.isActive = /** Returns whether the url is activated */
3942
- function (url, exact) {
3653
+ Router.prototype.isActive = function (url, exact) {
3943
3654
  if (url instanceof UrlTree) {
3944
3655
  return containsTree(this.currentUrlTree, url, exact);
3945
3656
  }
@@ -4016,9 +3727,7 @@ var Router = /** @class */ (function () {
4016
3727
  this.events
4017
3728
  .next(new NavigationStart(id, this.serializeUrl(url), source, state));
4018
3729
  Promise.resolve()
4019
- .then(function (_) {
4020
- return _this.runNavigate(url, rawUrl, !!extras.skipLocationChange, !!extras.replaceUrl, id, null);
4021
- })
3730
+ .then(function (_) { return _this.runNavigate(url, rawUrl, !!extras.skipLocationChange, !!extras.replaceUrl, id, null); })
4022
3731
  .then(resolve, reject);
4023
3732
  // we cannot process the current URL, but we could process the previous one =>
4024
3733
  // we need to do some cleanup
@@ -4028,9 +3737,7 @@ var Router = /** @class */ (function () {
4028
3737
  this.events
4029
3738
  .next(new NavigationStart(id, this.serializeUrl(url), source, state));
4030
3739
  Promise.resolve()
4031
- .then(function (_) {
4032
- return _this.runNavigate(url, rawUrl, false, false, id, createEmptyState(url, _this.rootComponentType).snapshot);
4033
- })
3740
+ .then(function (_) { return _this.runNavigate(url, rawUrl, false, false, id, createEmptyState(url, _this.rootComponentType).snapshot); })
4034
3741
  .then(resolve, reject);
4035
3742
  }
4036
3743
  else {
@@ -4130,15 +3837,7 @@ var Router = /** @class */ (function () {
4130
3837
  * Performs the logic of activating routes. This is a synchronous process by default. While this
4131
3838
  * is a private method, it could be overridden to make activation asynchronous.
4132
3839
  */
4133
- /**
4134
- * Performs the logic of activating routes. This is a synchronous process by default. While this
4135
- * is a private method, it could be overridden to make activation asynchronous.
4136
- */
4137
- Router.prototype.activateRoutes = /**
4138
- * Performs the logic of activating routes. This is a synchronous process by default. While this
4139
- * is a private method, it could be overridden to make activation asynchronous.
4140
- */
4141
- function (state, storedState, storedUrl, id, url, rawUrl, skipLocationChange, replaceUrl, resolvePromise, rejectPromise) {
3840
+ Router.prototype.activateRoutes = function (state, storedState, storedUrl, id, url, rawUrl, skipLocationChange, replaceUrl, resolvePromise, rejectPromise) {
4142
3841
  var _this = this;
4143
3842
  // applied the new router state
4144
3843
  // this operation has side effects
@@ -4227,10 +3926,7 @@ var ActivateRoutes = /** @class */ (function () {
4227
3926
  this.activateChildRoutes(futureRoot, currRoot, parentContexts);
4228
3927
  };
4229
3928
  // De-activate the child route that are not re-used for the future state
4230
- // De-activate the child route that are not re-used for the future state
4231
- ActivateRoutes.prototype.deactivateChildRoutes =
4232
- // De-activate the child route that are not re-used for the future state
4233
- function (futureNode, currNode, contexts) {
3929
+ ActivateRoutes.prototype.deactivateChildRoutes = function (futureNode, currNode, contexts) {
4234
3930
  var _this = this;
4235
3931
  var children = nodeChildrenAsMap(currNode);
4236
3932
  // Recurse on the routes active in the future state to de-activate deeper children
@@ -4489,10 +4185,10 @@ var RouterLink = /** @class */ (function () {
4489
4185
  configurable: true
4490
4186
  });
4491
4187
  Object.defineProperty(RouterLink.prototype, "preserveQueryParams", {
4492
- set: /**
4493
- * @deprecated 4.0.0 use `queryParamsHandling` instead.
4494
- */
4495
- function (value) {
4188
+ /**
4189
+ * @deprecated 4.0.0 use `queryParamsHandling` instead.
4190
+ */
4191
+ set: function (value) {
4496
4192
  if (core.isDevMode() && console && console.warn) {
4497
4193
  console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');
4498
4194
  }
@@ -4528,22 +4224,22 @@ var RouterLink = /** @class */ (function () {
4528
4224
  ];
4529
4225
  /** @nocollapse */
4530
4226
  RouterLink.ctorParameters = function () { return [
4531
- { type: Router, },
4532
- { type: ActivatedRoute, },
4533
- { type: undefined, decorators: [{ type: core.Attribute, args: ['tabindex',] },] },
4534
- { type: core.Renderer2, },
4535
- { type: core.ElementRef, },
4227
+ { type: Router },
4228
+ { type: ActivatedRoute },
4229
+ { type: String, decorators: [{ type: core.Attribute, args: ['tabindex',] }] },
4230
+ { type: core.Renderer2 },
4231
+ { type: core.ElementRef }
4536
4232
  ]; };
4537
4233
  RouterLink.propDecorators = {
4538
- "queryParams": [{ type: core.Input },],
4539
- "fragment": [{ type: core.Input },],
4540
- "queryParamsHandling": [{ type: core.Input },],
4541
- "preserveFragment": [{ type: core.Input },],
4542
- "skipLocationChange": [{ type: core.Input },],
4543
- "replaceUrl": [{ type: core.Input },],
4544
- "routerLink": [{ type: core.Input },],
4545
- "preserveQueryParams": [{ type: core.Input },],
4546
- "onClick": [{ type: core.HostListener, args: ['click',] },],
4234
+ queryParams: [{ type: core.Input }],
4235
+ fragment: [{ type: core.Input }],
4236
+ queryParamsHandling: [{ type: core.Input }],
4237
+ preserveFragment: [{ type: core.Input }],
4238
+ skipLocationChange: [{ type: core.Input }],
4239
+ replaceUrl: [{ type: core.Input }],
4240
+ routerLink: [{ type: core.Input }],
4241
+ preserveQueryParams: [{ type: core.Input }],
4242
+ onClick: [{ type: core.HostListener, args: ['click',] }]
4547
4243
  };
4548
4244
  return RouterLink;
4549
4245
  }());
@@ -4631,22 +4327,22 @@ var RouterLinkWithHref = /** @class */ (function () {
4631
4327
  ];
4632
4328
  /** @nocollapse */
4633
4329
  RouterLinkWithHref.ctorParameters = function () { return [
4634
- { type: Router, },
4635
- { type: ActivatedRoute, },
4636
- { type: common.LocationStrategy, },
4330
+ { type: Router },
4331
+ { type: ActivatedRoute },
4332
+ { type: common.LocationStrategy }
4637
4333
  ]; };
4638
4334
  RouterLinkWithHref.propDecorators = {
4639
- "target": [{ type: core.HostBinding, args: ['attr.target',] }, { type: core.Input },],
4640
- "queryParams": [{ type: core.Input },],
4641
- "fragment": [{ type: core.Input },],
4642
- "queryParamsHandling": [{ type: core.Input },],
4643
- "preserveFragment": [{ type: core.Input },],
4644
- "skipLocationChange": [{ type: core.Input },],
4645
- "replaceUrl": [{ type: core.Input },],
4646
- "href": [{ type: core.HostBinding },],
4647
- "routerLink": [{ type: core.Input },],
4648
- "preserveQueryParams": [{ type: core.Input },],
4649
- "onClick": [{ type: core.HostListener, args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'],] },],
4335
+ target: [{ type: core.HostBinding, args: ['attr.target',] }, { type: core.Input }],
4336
+ queryParams: [{ type: core.Input }],
4337
+ fragment: [{ type: core.Input }],
4338
+ queryParamsHandling: [{ type: core.Input }],
4339
+ preserveFragment: [{ type: core.Input }],
4340
+ skipLocationChange: [{ type: core.Input }],
4341
+ replaceUrl: [{ type: core.Input }],
4342
+ href: [{ type: core.HostBinding }],
4343
+ routerLink: [{ type: core.Input }],
4344
+ preserveQueryParams: [{ type: core.Input }],
4345
+ onClick: [{ type: core.HostListener, args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'],] }]
4650
4346
  };
4651
4347
  return RouterLinkWithHref;
4652
4348
  }());
@@ -4787,16 +4483,16 @@ var RouterLinkActive = /** @class */ (function () {
4787
4483
  ];
4788
4484
  /** @nocollapse */
4789
4485
  RouterLinkActive.ctorParameters = function () { return [
4790
- { type: Router, },
4791
- { type: core.ElementRef, },
4792
- { type: core.Renderer2, },
4793
- { type: core.ChangeDetectorRef, },
4486
+ { type: Router },
4487
+ { type: core.ElementRef },
4488
+ { type: core.Renderer2 },
4489
+ { type: core.ChangeDetectorRef }
4794
4490
  ]; };
4795
4491
  RouterLinkActive.propDecorators = {
4796
- "links": [{ type: core.ContentChildren, args: [RouterLink, { descendants: true },] },],
4797
- "linksWithHrefs": [{ type: core.ContentChildren, args: [RouterLinkWithHref, { descendants: true },] },],
4798
- "routerLinkActiveOptions": [{ type: core.Input },],
4799
- "routerLinkActive": [{ type: core.Input },],
4492
+ links: [{ type: core.ContentChildren, args: [RouterLink, { descendants: true },] }],
4493
+ linksWithHrefs: [{ type: core.ContentChildren, args: [RouterLinkWithHref, { descendants: true },] }],
4494
+ routerLinkActiveOptions: [{ type: core.Input }],
4495
+ routerLinkActive: [{ type: core.Input }]
4800
4496
  };
4801
4497
  return RouterLinkActive;
4802
4498
  }());
@@ -4834,9 +4530,7 @@ var ChildrenOutletContexts = /** @class */ (function () {
4834
4530
  this.contexts = new Map();
4835
4531
  }
4836
4532
  /** Called when a `RouterOutlet` directive is instantiated */
4837
- /** Called when a `RouterOutlet` directive is instantiated */
4838
- ChildrenOutletContexts.prototype.onChildOutletCreated = /** Called when a `RouterOutlet` directive is instantiated */
4839
- function (childName, outlet) {
4533
+ ChildrenOutletContexts.prototype.onChildOutletCreated = function (childName, outlet) {
4840
4534
  var context = this.getOrCreateContext(childName);
4841
4535
  context.outlet = outlet;
4842
4536
  this.contexts.set(childName, context);
@@ -4846,17 +4540,7 @@ var ChildrenOutletContexts = /** @class */ (function () {
4846
4540
  * We need to keep the context as the outlet could be destroyed inside a NgIf and might be
4847
4541
  * re-created later.
4848
4542
  */
4849
- /**
4850
- * Called when a `RouterOutlet` directive is destroyed.
4851
- * We need to keep the context as the outlet could be destroyed inside a NgIf and might be
4852
- * re-created later.
4853
- */
4854
- ChildrenOutletContexts.prototype.onChildOutletDestroyed = /**
4855
- * Called when a `RouterOutlet` directive is destroyed.
4856
- * We need to keep the context as the outlet could be destroyed inside a NgIf and might be
4857
- * re-created later.
4858
- */
4859
- function (childName) {
4543
+ ChildrenOutletContexts.prototype.onChildOutletDestroyed = function (childName) {
4860
4544
  var context = this.getContext(childName);
4861
4545
  if (context) {
4862
4546
  context.outlet = null;
@@ -4866,15 +4550,7 @@ var ChildrenOutletContexts = /** @class */ (function () {
4866
4550
  * Called when the corresponding route is deactivated during navigation.
4867
4551
  * Because the component get destroyed, all children outlet are destroyed.
4868
4552
  */
4869
- /**
4870
- * Called when the corresponding route is deactivated during navigation.
4871
- * Because the component get destroyed, all children outlet are destroyed.
4872
- */
4873
- ChildrenOutletContexts.prototype.onOutletDeactivated = /**
4874
- * Called when the corresponding route is deactivated during navigation.
4875
- * Because the component get destroyed, all children outlet are destroyed.
4876
- */
4877
- function () {
4553
+ ChildrenOutletContexts.prototype.onOutletDeactivated = function () {
4878
4554
  var contexts = this.contexts;
4879
4555
  this.contexts = new Map();
4880
4556
  return contexts;
@@ -4989,13 +4665,7 @@ var RouterOutlet = /** @class */ (function () {
4989
4665
  /**
4990
4666
  * Called when the `RouteReuseStrategy` instructs to detach the subtree
4991
4667
  */
4992
- /**
4993
- * Called when the `RouteReuseStrategy` instructs to detach the subtree
4994
- */
4995
- RouterOutlet.prototype.detach = /**
4996
- * Called when the `RouteReuseStrategy` instructs to detach the subtree
4997
- */
4998
- function () {
4668
+ RouterOutlet.prototype.detach = function () {
4999
4669
  if (!this.activated)
5000
4670
  throw new Error('Outlet is not activated');
5001
4671
  this.location.detach();
@@ -5007,13 +4677,7 @@ var RouterOutlet = /** @class */ (function () {
5007
4677
  /**
5008
4678
  * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
5009
4679
  */
5010
- /**
5011
- * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
5012
- */
5013
- RouterOutlet.prototype.attach = /**
5014
- * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
5015
- */
5016
- function (ref, activatedRoute) {
4680
+ RouterOutlet.prototype.attach = function (ref, activatedRoute) {
5017
4681
  this.activated = ref;
5018
4682
  this._activatedRoute = activatedRoute;
5019
4683
  this.location.insert(ref.hostView);
@@ -5049,15 +4713,15 @@ var RouterOutlet = /** @class */ (function () {
5049
4713
  ];
5050
4714
  /** @nocollapse */
5051
4715
  RouterOutlet.ctorParameters = function () { return [
5052
- { type: ChildrenOutletContexts, },
5053
- { type: core.ViewContainerRef, },
5054
- { type: core.ComponentFactoryResolver, },
5055
- { type: undefined, decorators: [{ type: core.Attribute, args: ['name',] },] },
5056
- { type: core.ChangeDetectorRef, },
4716
+ { type: ChildrenOutletContexts },
4717
+ { type: core.ViewContainerRef },
4718
+ { type: core.ComponentFactoryResolver },
4719
+ { type: String, decorators: [{ type: core.Attribute, args: ['name',] }] },
4720
+ { type: core.ChangeDetectorRef }
5057
4721
  ]; };
5058
4722
  RouterOutlet.propDecorators = {
5059
- "activateEvents": [{ type: core.Output, args: ['activate',] },],
5060
- "deactivateEvents": [{ type: core.Output, args: ['deactivate',] },],
4723
+ activateEvents: [{ type: core.Output, args: ['activate',] }],
4724
+ deactivateEvents: [{ type: core.Output, args: ['deactivate',] }]
5061
4725
  };
5062
4726
  return RouterOutlet;
5063
4727
  }());
@@ -5167,14 +4831,7 @@ var RouterPreloader = /** @class */ (function () {
5167
4831
  // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If
5168
4832
  // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This
5169
4833
  // should be refactored.
5170
- // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If
5171
- // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This
5172
- // should be refactored.
5173
- RouterPreloader.prototype.ngOnDestroy =
5174
- // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If
5175
- // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This
5176
- // should be refactored.
5177
- function () { this.subscription.unsubscribe(); };
4834
+ RouterPreloader.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };
5178
4835
  RouterPreloader.prototype.processRoutes = function (ngModule, routes) {
5179
4836
  var res = [];
5180
4837
  try {
@@ -5220,11 +4877,11 @@ var RouterPreloader = /** @class */ (function () {
5220
4877
  ];
5221
4878
  /** @nocollapse */
5222
4879
  RouterPreloader.ctorParameters = function () { return [
5223
- { type: Router, },
5224
- { type: core.NgModuleFactoryLoader, },
5225
- { type: core.Compiler, },
5226
- { type: core.Injector, },
5227
- { type: PreloadingStrategy, },
4880
+ { type: Router },
4881
+ { type: core.NgModuleFactoryLoader },
4882
+ { type: core.Compiler },
4883
+ { type: core.Injector },
4884
+ { type: PreloadingStrategy }
5228
4885
  ]; };
5229
4886
  return RouterPreloader;
5230
4887
  }());
@@ -5243,7 +4900,7 @@ var RouterPreloader = /** @class */ (function () {
5243
4900
  *
5244
4901
  *
5245
4902
  */
5246
- var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive];
4903
+ var ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];
5247
4904
  /**
5248
4905
  * @description
5249
4906
  *
@@ -5348,35 +5005,7 @@ var RouterModule = /** @class */ (function () {
5348
5005
  * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See
5349
5006
  * `ExtraOptions` for more details.
5350
5007
  */
5351
- /**
5352
- * Creates a module with all the router providers and directives. It also optionally sets up an
5353
- * application listener to perform an initial navigation.
5354
- *
5355
- * Options (see `ExtraOptions`):
5356
- * * `enableTracing` makes the router log all its internal events to the console.
5357
- * * `useHash` enables the location strategy that uses the URL fragment instead of the history
5358
- * API.
5359
- * * `initialNavigation` disables the initial navigation.
5360
- * * `errorHandler` provides a custom error handler.
5361
- * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).
5362
- * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See
5363
- * `ExtraOptions` for more details.
5364
- */
5365
- RouterModule.forRoot = /**
5366
- * Creates a module with all the router providers and directives. It also optionally sets up an
5367
- * application listener to perform an initial navigation.
5368
- *
5369
- * Options (see `ExtraOptions`):
5370
- * * `enableTracing` makes the router log all its internal events to the console.
5371
- * * `useHash` enables the location strategy that uses the URL fragment instead of the history
5372
- * API.
5373
- * * `initialNavigation` disables the initial navigation.
5374
- * * `errorHandler` provides a custom error handler.
5375
- * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).
5376
- * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See
5377
- * `ExtraOptions` for more details.
5378
- */
5379
- function (routes, config) {
5008
+ RouterModule.forRoot = function (routes, config) {
5380
5009
  return {
5381
5010
  ngModule: RouterModule,
5382
5011
  providers: [
@@ -5408,22 +5037,20 @@ var RouterModule = /** @class */ (function () {
5408
5037
  /**
5409
5038
  * Creates a module with all the router directives and a provider registering routes.
5410
5039
  */
5411
- /**
5412
- * Creates a module with all the router directives and a provider registering routes.
5413
- */
5414
- RouterModule.forChild = /**
5415
- * Creates a module with all the router directives and a provider registering routes.
5416
- */
5417
- function (routes) {
5040
+ RouterModule.forChild = function (routes) {
5418
5041
  return { ngModule: RouterModule, providers: [provideRoutes(routes)] };
5419
5042
  };
5420
5043
  RouterModule.decorators = [
5421
- { type: core.NgModule, args: [{ declarations: ROUTER_DIRECTIVES, exports: ROUTER_DIRECTIVES },] }
5044
+ { type: core.NgModule, args: [{
5045
+ declarations: ROUTER_DIRECTIVES,
5046
+ exports: ROUTER_DIRECTIVES,
5047
+ entryComponents: [EmptyOutletComponent]
5048
+ },] }
5422
5049
  ];
5423
5050
  /** @nocollapse */
5424
5051
  RouterModule.ctorParameters = function () { return [
5425
- { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ROUTER_FORROOT_GUARD,] },] },
5426
- { type: Router, decorators: [{ type: core.Optional },] },
5052
+ { type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ROUTER_FORROOT_GUARD,] }] },
5053
+ { type: Router, decorators: [{ type: core.Optional }] }
5427
5054
  ]; };
5428
5055
  return RouterModule;
5429
5056
  }());
@@ -5514,7 +5141,7 @@ var RouterInitializer = /** @class */ (function () {
5514
5141
  var _this = this;
5515
5142
  var p = this.injector.get(common.LOCATION_INITIALIZED, Promise.resolve(null));
5516
5143
  return p.then(function () {
5517
- var resolve = (null);
5144
+ var resolve = null;
5518
5145
  var res = new Promise(function (r) { return resolve = r; });
5519
5146
  var router = _this.injector.get(Router);
5520
5147
  var opts = _this.injector.get(ROUTER_CONFIGURATION);
@@ -5562,7 +5189,7 @@ var RouterInitializer = /** @class */ (function () {
5562
5189
  }
5563
5190
  preloader.setUpPreloading();
5564
5191
  router.resetRootComponentType(ref.componentTypes[0]);
5565
- this.resultOfPreactivationDone.next((null));
5192
+ this.resultOfPreactivationDone.next(null);
5566
5193
  this.resultOfPreactivationDone.complete();
5567
5194
  };
5568
5195
  RouterInitializer.prototype.isLegacyEnabled = function (opts) {
@@ -5577,7 +5204,7 @@ var RouterInitializer = /** @class */ (function () {
5577
5204
  ];
5578
5205
  /** @nocollapse */
5579
5206
  RouterInitializer.ctorParameters = function () { return [
5580
- { type: core.Injector, },
5207
+ { type: core.Injector }
5581
5208
  ]; };
5582
5209
  return RouterInitializer;
5583
5210
  }());
@@ -5614,7 +5241,12 @@ function provideRouterInitializer() {
5614
5241
  * Use of this source code is governed by an MIT-style license that can be
5615
5242
  * found in the LICENSE file at https://angular.io/license
5616
5243
  */
5617
- var VERSION = new core.Version('6.0.3');
5244
+ /**
5245
+ * @module
5246
+ * @description
5247
+ * Entry point for all public APIs of the common package.
5248
+ */
5249
+ var VERSION = new core.Version('6.0.7');
5618
5250
 
5619
5251
  /**
5620
5252
  * @license
@@ -5639,6 +5271,11 @@ var VERSION = new core.Version('6.0.3');
5639
5271
  * Use of this source code is governed by an MIT-style license that can be
5640
5272
  * found in the LICENSE file at https://angular.io/license
5641
5273
  */
5274
+ /**
5275
+ * @module
5276
+ * @description
5277
+ * Entry point for all public APIs of this package.
5278
+ */
5642
5279
 
5643
5280
  // This file only reexports content of the `src` folder. Keep it that way.
5644
5281
 
@@ -5649,6 +5286,10 @@ var VERSION = new core.Version('6.0.3');
5649
5286
  * Use of this source code is governed by an MIT-style license that can be
5650
5287
  * found in the LICENSE file at https://angular.io/license
5651
5288
  */
5289
+ // This file is not used to build this module. It is only used during editing
5290
+ // by the TypeScript language service and during build for verification. `ngc`
5291
+ // replaces this file with production index.ts when it rewrites private symbol
5292
+ // names.
5652
5293
 
5653
5294
  /**
5654
5295
  * Generated bundle index. Do not edit.
@@ -5712,6 +5353,7 @@ exports.UrlSegmentGroup = UrlSegmentGroup;
5712
5353
  exports.UrlSerializer = UrlSerializer;
5713
5354
  exports.UrlTree = UrlTree;
5714
5355
  exports.VERSION = VERSION;
5356
+ exports.ɵEmptyOutletComponent = EmptyOutletComponent;
5715
5357
  exports.ɵROUTER_PROVIDERS = ROUTER_PROVIDERS;
5716
5358
  exports.ɵflatten = flatten;
5717
5359