@angular/router 9.1.0 → 9.1.4

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 (100) hide show
  1. package/bundles/router-testing.umd.js +24 -5
  2. package/bundles/router-testing.umd.js.map +1 -1
  3. package/bundles/router-testing.umd.min.js +4 -4
  4. package/bundles/router-testing.umd.min.js.map +1 -1
  5. package/bundles/router-upgrade.umd.js +4 -2
  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 +282 -138
  10. package/bundles/router.umd.js.map +1 -1
  11. package/bundles/router.umd.min.js +26 -26
  12. package/bundles/router.umd.min.js.map +1 -1
  13. package/esm2015/index.js +1 -1
  14. package/esm2015/public_api.js +1 -1
  15. package/esm2015/src/apply_redirects.js +6 -4
  16. package/esm2015/src/config.js +1 -1
  17. package/esm2015/src/create_url_tree.js +1 -1
  18. package/esm2015/src/directives/router_link.js +9 -4
  19. package/esm2015/src/directives/router_link_active.js +7 -3
  20. package/esm2015/src/directives/router_outlet.js +7 -3
  21. package/esm2015/src/events.js +13 -5
  22. package/esm2015/src/index.js +3 -3
  23. package/esm2015/src/interfaces.js +1 -1
  24. package/esm2015/src/operators/activate_routes.js +1 -1
  25. package/esm2015/src/operators/check_guards.js +8 -5
  26. package/esm2015/src/operators/prioritized_guard_value.js +7 -7
  27. package/esm2015/src/operators/recognize.js +1 -1
  28. package/esm2015/src/operators/resolve_data.js +4 -2
  29. package/esm2015/src/operators/switch_tap.js +1 -1
  30. package/esm2015/src/recognize.js +7 -5
  31. package/esm2015/src/route_reuse_strategy.js +10 -4
  32. package/esm2015/src/router.js +86 -55
  33. package/esm2015/src/router_config_loader.js +1 -1
  34. package/esm2015/src/router_module.js +4 -6
  35. package/esm2015/src/router_outlet_context.js +7 -3
  36. package/esm2015/src/router_preloader.js +13 -9
  37. package/esm2015/src/router_scroller.js +1 -1
  38. package/esm2015/src/router_state.js +42 -16
  39. package/esm2015/src/shared.js +10 -4
  40. package/esm2015/src/url_handling_strategy.js +10 -4
  41. package/esm2015/src/url_tree.js +21 -9
  42. package/esm2015/src/utils/collection.js +1 -1
  43. package/esm2015/src/utils/preactivation.js +1 -1
  44. package/esm2015/src/utils/tree.js +17 -9
  45. package/esm2015/src/version.js +1 -1
  46. package/esm2015/testing/src/router_testing_module.js +5 -3
  47. package/esm2015/upgrade/src/upgrade.js +4 -2
  48. package/esm5/src/apply_redirects.js +3 -3
  49. package/esm5/src/config.js +1 -1
  50. package/esm5/src/create_url_tree.js +1 -1
  51. package/esm5/src/directives/router_link.js +9 -4
  52. package/esm5/src/directives/router_link_active.js +7 -3
  53. package/esm5/src/directives/router_outlet.js +7 -3
  54. package/esm5/src/events.js +13 -5
  55. package/esm5/src/index.js +3 -3
  56. package/esm5/src/interfaces.js +1 -1
  57. package/esm5/src/operators/activate_routes.js +1 -1
  58. package/esm5/src/operators/check_guards.js +22 -19
  59. package/esm5/src/operators/prioritized_guard_value.js +7 -7
  60. package/esm5/src/operators/recognize.js +1 -1
  61. package/esm5/src/operators/resolve_data.js +1 -1
  62. package/esm5/src/operators/switch_tap.js +1 -1
  63. package/esm5/src/recognize.js +7 -5
  64. package/esm5/src/route_reuse_strategy.js +10 -4
  65. package/esm5/src/router.js +87 -54
  66. package/esm5/src/router_config_loader.js +1 -1
  67. package/esm5/src/router_module.js +5 -7
  68. package/esm5/src/router_outlet_context.js +7 -3
  69. package/esm5/src/router_preloader.js +13 -9
  70. package/esm5/src/router_scroller.js +1 -1
  71. package/esm5/src/router_state.js +46 -18
  72. package/esm5/src/shared.js +7 -3
  73. package/esm5/src/url_handling_strategy.js +10 -4
  74. package/esm5/src/url_tree.js +21 -9
  75. package/esm5/src/utils/collection.js +1 -1
  76. package/esm5/src/utils/preactivation.js +1 -1
  77. package/esm5/src/utils/tree.js +10 -4
  78. package/esm5/src/version.js +1 -1
  79. package/esm5/testing/src/router_testing_module.js +5 -3
  80. package/esm5/upgrade/src/upgrade.js +4 -2
  81. package/fesm2015/router.js +252 -121
  82. package/fesm2015/router.js.map +1 -1
  83. package/fesm2015/testing.js +4 -2
  84. package/fesm2015/testing.js.map +1 -1
  85. package/fesm2015/upgrade.js +4 -2
  86. package/fesm2015/upgrade.js.map +1 -1
  87. package/fesm5/router.js +262 -135
  88. package/fesm5/router.js.map +1 -1
  89. package/fesm5/testing.js +4 -2
  90. package/fesm5/testing.js.map +1 -1
  91. package/fesm5/upgrade.js +4 -2
  92. package/fesm5/upgrade.js.map +1 -1
  93. package/package.json +4 -4
  94. package/router.d.ts +25 -22
  95. package/router.metadata.json +1 -1
  96. package/testing/testing.d.ts +1 -1
  97. package/testing/testing.metadata.json +1 -1
  98. package/testing.d.ts +1 -1
  99. package/upgrade/upgrade.d.ts +1 -1
  100. package/upgrade.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v9.1.0
2
+ * @license Angular v9.1.4
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -93,7 +93,9 @@ class NavigationStart extends RouterEvent {
93
93
  * \@docsNotRequired
94
94
  * @return {?}
95
95
  */
96
- toString() { return `NavigationStart(id: ${this.id}, url: '${this.url}')`; }
96
+ toString() {
97
+ return `NavigationStart(id: ${this.id}, url: '${this.url}')`;
98
+ }
97
99
  }
98
100
  if (false) {
99
101
  /**
@@ -183,7 +185,9 @@ class NavigationCancel extends RouterEvent {
183
185
  * \@docsNotRequired
184
186
  * @return {?}
185
187
  */
186
- toString() { return `NavigationCancel(id: ${this.id}, url: '${this.url}')`; }
188
+ toString() {
189
+ return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;
190
+ }
187
191
  }
188
192
  if (false) {
189
193
  /**
@@ -453,7 +457,9 @@ class RouteConfigLoadStart {
453
457
  /**
454
458
  * @return {?}
455
459
  */
456
- toString() { return `RouteConfigLoadStart(path: ${this.route.path})`; }
460
+ toString() {
461
+ return `RouteConfigLoadStart(path: ${this.route.path})`;
462
+ }
457
463
  }
458
464
  if (false) {
459
465
  /**
@@ -477,7 +483,9 @@ class RouteConfigLoadEnd {
477
483
  /**
478
484
  * @return {?}
479
485
  */
480
- toString() { return `RouteConfigLoadEnd(path: ${this.route.path})`; }
486
+ toString() {
487
+ return `RouteConfigLoadEnd(path: ${this.route.path})`;
488
+ }
481
489
  }
482
490
  if (false) {
483
491
  /**
@@ -736,12 +744,16 @@ class ParamsAsMap {
736
744
  /**
737
745
  * @param {?} params
738
746
  */
739
- constructor(params) { this.params = params || {}; }
747
+ constructor(params) {
748
+ this.params = params || {};
749
+ }
740
750
  /**
741
751
  * @param {?} name
742
752
  * @return {?}
743
753
  */
744
- has(name) { return this.params.hasOwnProperty(name); }
754
+ has(name) {
755
+ return this.params.hasOwnProperty(name);
756
+ }
745
757
  /**
746
758
  * @param {?} name
747
759
  * @return {?}
@@ -769,7 +781,9 @@ class ParamsAsMap {
769
781
  /**
770
782
  * @return {?}
771
783
  */
772
- get keys() { return Object.keys(this.params); }
784
+ get keys() {
785
+ return Object.keys(this.params);
786
+ }
773
787
  }
774
788
  if (false) {
775
789
  /**
@@ -1665,7 +1679,9 @@ class UrlTree {
1665
1679
  * \@docsNotRequired
1666
1680
  * @return {?}
1667
1681
  */
1668
- toString() { return DEFAULT_SERIALIZER.serialize(this); }
1682
+ toString() {
1683
+ return DEFAULT_SERIALIZER.serialize(this);
1684
+ }
1669
1685
  }
1670
1686
  if (false) {
1671
1687
  /**
@@ -1723,17 +1739,23 @@ class UrlSegmentGroup {
1723
1739
  * Whether the segment has child segments
1724
1740
  * @return {?}
1725
1741
  */
1726
- hasChildren() { return this.numberOfChildren > 0; }
1742
+ hasChildren() {
1743
+ return this.numberOfChildren > 0;
1744
+ }
1727
1745
  /**
1728
1746
  * Number of child segments
1729
1747
  * @return {?}
1730
1748
  */
1731
- get numberOfChildren() { return Object.keys(this.children).length; }
1749
+ get numberOfChildren() {
1750
+ return Object.keys(this.children).length;
1751
+ }
1732
1752
  /**
1733
1753
  * \@docsNotRequired
1734
1754
  * @return {?}
1735
1755
  */
1736
- toString() { return serializePaths(this); }
1756
+ toString() {
1757
+ return serializePaths(this);
1758
+ }
1737
1759
  }
1738
1760
  if (false) {
1739
1761
  /**
@@ -1810,7 +1832,9 @@ class UrlSegment {
1810
1832
  * \@docsNotRequired
1811
1833
  * @return {?}
1812
1834
  */
1813
- toString() { return serializePath(this); }
1835
+ toString() {
1836
+ return serializePath(this);
1837
+ }
1814
1838
  }
1815
1839
  if (false) {
1816
1840
  /**
@@ -2126,7 +2150,7 @@ function serializeQueryParams(params) {
2126
2150
  v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`)).join('&') :
2127
2151
  `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;
2128
2152
  }));
2129
- return strParams.length ? `?${strParams.join("&")}` : '';
2153
+ return strParams.length ? `?${strParams.join('&')}` : '';
2130
2154
  }
2131
2155
  /** @type {?} */
2132
2156
  const SEGMENT_RE = /^[^\/()?;=#]+/;
@@ -2371,7 +2395,9 @@ class UrlParser {
2371
2395
  * @param {?} str
2372
2396
  * @return {?}
2373
2397
  */
2374
- peekStartsWith(str) { return this.remaining.startsWith(str); }
2398
+ peekStartsWith(str) {
2399
+ return this.remaining.startsWith(str);
2400
+ }
2375
2401
  // Consumes the prefix when it is present and returns whether it has been consumed
2376
2402
  /**
2377
2403
  * @private
@@ -2428,11 +2454,15 @@ class Tree {
2428
2454
  /**
2429
2455
  * @param {?} root
2430
2456
  */
2431
- constructor(root) { this._root = root; }
2457
+ constructor(root) {
2458
+ this._root = root;
2459
+ }
2432
2460
  /**
2433
2461
  * @return {?}
2434
2462
  */
2435
- get root() { return this._root.value; }
2463
+ get root() {
2464
+ return this._root.value;
2465
+ }
2436
2466
  /**
2437
2467
  * \@internal
2438
2468
  * @param {?} t
@@ -2494,11 +2524,13 @@ class Tree {
2494
2524
  * @param {?} t
2495
2525
  * @return {?}
2496
2526
  */
2497
- pathFromRoot(t) { return findPath(t, this._root).map((/**
2498
- * @param {?} s
2499
- * @return {?}
2500
- */
2501
- s => s.value)); }
2527
+ pathFromRoot(t) {
2528
+ return findPath(t, this._root).map((/**
2529
+ * @param {?} s
2530
+ * @return {?}
2531
+ */
2532
+ s => s.value));
2533
+ }
2502
2534
  }
2503
2535
  if (false) {
2504
2536
  /**
@@ -2560,7 +2592,9 @@ class TreeNode {
2560
2592
  /**
2561
2593
  * @return {?}
2562
2594
  */
2563
- toString() { return `TreeNode(${this.value})`; }
2595
+ toString() {
2596
+ return `TreeNode(${this.value})`;
2597
+ }
2564
2598
  }
2565
2599
  if (false) {
2566
2600
  /** @type {?} */
@@ -2635,7 +2669,9 @@ class RouterState extends Tree {
2635
2669
  /**
2636
2670
  * @return {?}
2637
2671
  */
2638
- toString() { return this.snapshot.toString(); }
2672
+ toString() {
2673
+ return this.snapshot.toString();
2674
+ }
2639
2675
  }
2640
2676
  if (false) {
2641
2677
  /**
@@ -2721,32 +2757,44 @@ class ActivatedRoute {
2721
2757
  * The configuration used to match this route.
2722
2758
  * @return {?}
2723
2759
  */
2724
- get routeConfig() { return this._futureSnapshot.routeConfig; }
2760
+ get routeConfig() {
2761
+ return this._futureSnapshot.routeConfig;
2762
+ }
2725
2763
  /**
2726
2764
  * The root of the router state.
2727
2765
  * @return {?}
2728
2766
  */
2729
- get root() { return this._routerState.root; }
2767
+ get root() {
2768
+ return this._routerState.root;
2769
+ }
2730
2770
  /**
2731
2771
  * The parent of this route in the router state tree.
2732
2772
  * @return {?}
2733
2773
  */
2734
- get parent() { return this._routerState.parent(this); }
2774
+ get parent() {
2775
+ return this._routerState.parent(this);
2776
+ }
2735
2777
  /**
2736
2778
  * The first child of this route in the router state tree.
2737
2779
  * @return {?}
2738
2780
  */
2739
- get firstChild() { return this._routerState.firstChild(this); }
2781
+ get firstChild() {
2782
+ return this._routerState.firstChild(this);
2783
+ }
2740
2784
  /**
2741
2785
  * The children of this route in the router state tree.
2742
2786
  * @return {?}
2743
2787
  */
2744
- get children() { return this._routerState.children(this); }
2788
+ get children() {
2789
+ return this._routerState.children(this);
2790
+ }
2745
2791
  /**
2746
2792
  * The path from the root of the router state tree to this route.
2747
2793
  * @return {?}
2748
2794
  */
2749
- get pathFromRoot() { return this._routerState.pathFromRoot(this); }
2795
+ get pathFromRoot() {
2796
+ return this._routerState.pathFromRoot(this);
2797
+ }
2750
2798
  /**
2751
2799
  * An Observable that contains a map of the required and optional parameters
2752
2800
  * specific to the route.
@@ -2956,27 +3004,37 @@ class ActivatedRouteSnapshot {
2956
3004
  * The root of the router state
2957
3005
  * @return {?}
2958
3006
  */
2959
- get root() { return this._routerState.root; }
3007
+ get root() {
3008
+ return this._routerState.root;
3009
+ }
2960
3010
  /**
2961
3011
  * The parent of this route in the router state tree
2962
3012
  * @return {?}
2963
3013
  */
2964
- get parent() { return this._routerState.parent(this); }
3014
+ get parent() {
3015
+ return this._routerState.parent(this);
3016
+ }
2965
3017
  /**
2966
3018
  * The first child of this route in the router state tree
2967
3019
  * @return {?}
2968
3020
  */
2969
- get firstChild() { return this._routerState.firstChild(this); }
3021
+ get firstChild() {
3022
+ return this._routerState.firstChild(this);
3023
+ }
2970
3024
  /**
2971
3025
  * The children of this route in the router state tree
2972
3026
  * @return {?}
2973
3027
  */
2974
- get children() { return this._routerState.children(this); }
3028
+ get children() {
3029
+ return this._routerState.children(this);
3030
+ }
2975
3031
  /**
2976
3032
  * The path from the root of the router state tree to this route
2977
3033
  * @return {?}
2978
3034
  */
2979
- get pathFromRoot() { return this._routerState.pathFromRoot(this); }
3035
+ get pathFromRoot() {
3036
+ return this._routerState.pathFromRoot(this);
3037
+ }
2980
3038
  /**
2981
3039
  * @return {?}
2982
3040
  */
@@ -3128,7 +3186,9 @@ class RouterStateSnapshot extends Tree {
3128
3186
  /**
3129
3187
  * @return {?}
3130
3188
  */
3131
- toString() { return serializeNode(this._root); }
3189
+ toString() {
3190
+ return serializeNode(this._root);
3191
+ }
3132
3192
  }
3133
3193
  if (false) {
3134
3194
  /**
@@ -4172,7 +4232,9 @@ class NoMatch {
4172
4232
  /**
4173
4233
  * @param {?=} segmentGroup
4174
4234
  */
4175
- constructor(segmentGroup) { this.segmentGroup = segmentGroup || null; }
4235
+ constructor(segmentGroup) {
4236
+ this.segmentGroup = segmentGroup || null;
4237
+ }
4176
4238
  }
4177
4239
  if (false) {
4178
4240
  /** @type {?} */
@@ -5300,13 +5362,13 @@ function prioritizedGuardValue() {
5300
5362
  // Toggle pending flag if any values haven't been set yet
5301
5363
  if (val === INITIAL_VALUE)
5302
5364
  isPending = true;
5303
- // Any other return values are only valid if we haven't yet hit a pending call.
5304
- // This guarantees that in the case of a guard at the bottom of the tree that
5305
- // returns a redirect, we will wait for the higher priority guard at the top to
5306
- // finish before performing the redirect.
5365
+ // Any other return values are only valid if we haven't yet hit a pending
5366
+ // call. This guarantees that in the case of a guard at the bottom of the
5367
+ // tree that returns a redirect, we will wait for the higher priority
5368
+ // guard at the top to finish before performing the redirect.
5307
5369
  if (!isPending) {
5308
- // Early return when we hit a `false` value as that should always cancel
5309
- // navigation
5370
+ // Early return when we hit a `false` value as that should always
5371
+ // cancel navigation
5310
5372
  if (val === false)
5311
5373
  return val;
5312
5374
  if (i === list.length - 1 || isUrlTree(val)) {
@@ -5386,7 +5448,9 @@ function runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {
5386
5448
  * @param {?} result
5387
5449
  * @return {?}
5388
5450
  */
5389
- result => { return result !== true; }), (/** @type {?} */ (true))));
5451
+ result => {
5452
+ return result !== true;
5453
+ }), (/** @type {?} */ (true))));
5390
5454
  }
5391
5455
  /**
5392
5456
  * @param {?} futureSnapshot
@@ -5418,7 +5482,9 @@ function runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEve
5418
5482
  * @param {?} result
5419
5483
  * @return {?}
5420
5484
  */
5421
- result => { return result !== true; }), (/** @type {?} */ (true))));
5485
+ result => {
5486
+ return result !== true;
5487
+ }), (/** @type {?} */ (true))));
5422
5488
  }
5423
5489
  /**
5424
5490
  * This should fire off `ActivationStart` events for each route being activated at this
@@ -5575,8 +5641,7 @@ function runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector
5575
5641
  /** @type {?} */
5576
5642
  let observable;
5577
5643
  if (isCanDeactivate(guard)) {
5578
- observable =
5579
- wrapIntoObservable(guard.canDeactivate((/** @type {?} */ (component)), currARS, currRSS, futureRSS));
5644
+ observable = wrapIntoObservable(guard.canDeactivate((/** @type {?} */ (component)), currARS, currRSS, futureRSS));
5580
5645
  }
5581
5646
  else if (isFunction(guard)) {
5582
5647
  observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));
@@ -5877,7 +5942,9 @@ function match$1(segmentGroup, route, segments) {
5877
5942
  * @param {?} k
5878
5943
  * @return {?}
5879
5944
  */
5880
- (v, k) => { posParams[k] = v.path; }));
5945
+ (v, k) => {
5946
+ posParams[k] = v.path;
5947
+ }));
5881
5948
  /** @type {?} */
5882
5949
  const parameters = res.consumed.length > 0 ? Object.assign(Object.assign({}, posParams), res.consumed[res.consumed.length - 1].parameters) :
5883
5950
  posParams;
@@ -6202,7 +6269,9 @@ function resolveNode(resolve, futureARS, futureRSS, moduleInjector) {
6202
6269
  * @param {?} value
6203
6270
  * @return {?}
6204
6271
  */
6205
- (value) => { return { [key]: value }; })));
6272
+ (value) => {
6273
+ return { [key]: value };
6274
+ })));
6206
6275
  }
6207
6276
  /** @type {?} */
6208
6277
  const data = {};
@@ -6350,7 +6419,9 @@ class DefaultRouteReuseStrategy {
6350
6419
  * @param {?} route
6351
6420
  * @return {?}
6352
6421
  */
6353
- shouldDetach(route) { return false; }
6422
+ shouldDetach(route) {
6423
+ return false;
6424
+ }
6354
6425
  /**
6355
6426
  * @param {?} route
6356
6427
  * @param {?} detachedTree
@@ -6361,12 +6432,16 @@ class DefaultRouteReuseStrategy {
6361
6432
  * @param {?} route
6362
6433
  * @return {?}
6363
6434
  */
6364
- shouldAttach(route) { return false; }
6435
+ shouldAttach(route) {
6436
+ return false;
6437
+ }
6365
6438
  /**
6366
6439
  * @param {?} route
6367
6440
  * @return {?}
6368
6441
  */
6369
- retrieve(route) { return null; }
6442
+ retrieve(route) {
6443
+ return null;
6444
+ }
6370
6445
  /**
6371
6446
  * @param {?} future
6372
6447
  * @param {?} curr
@@ -6534,18 +6609,24 @@ class DefaultUrlHandlingStrategy {
6534
6609
  * @param {?} url
6535
6610
  * @return {?}
6536
6611
  */
6537
- shouldProcessUrl(url) { return true; }
6612
+ shouldProcessUrl(url) {
6613
+ return true;
6614
+ }
6538
6615
  /**
6539
6616
  * @param {?} url
6540
6617
  * @return {?}
6541
6618
  */
6542
- extract(url) { return url; }
6619
+ extract(url) {
6620
+ return url;
6621
+ }
6543
6622
  /**
6544
6623
  * @param {?} newUrlPart
6545
6624
  * @param {?} wholeUrl
6546
6625
  * @return {?}
6547
6626
  */
6548
- merge(newUrlPart, wholeUrl) { return newUrlPart; }
6627
+ merge(newUrlPart, wholeUrl) {
6628
+ return newUrlPart;
6629
+ }
6549
6630
  }
6550
6631
 
6551
6632
  /**
@@ -6774,10 +6855,7 @@ class Router {
6774
6855
  *
6775
6856
  * \@internal
6776
6857
  */
6777
- this.hooks = {
6778
- beforePreactivation: defaultRouterHook,
6779
- afterPreactivation: defaultRouterHook
6780
- };
6858
+ this.hooks = { beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook };
6781
6859
  /**
6782
6860
  * A strategy for extracting and merging URLs.
6783
6861
  * Used for AngularJS to Angular migrations.
@@ -6913,7 +6991,8 @@ class Router {
6913
6991
  */
6914
6992
  t => {
6915
6993
  /** @type {?} */
6916
- const urlTransition = !this.navigated || t.extractedUrl.toString() !== this.browserUrlTree.toString();
6994
+ const urlTransition = !this.navigated ||
6995
+ t.extractedUrl.toString() !== this.browserUrlTree.toString();
6917
6996
  /** @type {?} */
6918
6997
  const processCurrentUrl = (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&
6919
6998
  this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
@@ -6933,8 +7012,8 @@ class Router {
6933
7012
  }
6934
7013
  return [t];
6935
7014
  })),
6936
- // This delay is required to match old behavior that forced navigation to
6937
- // always be async
7015
+ // This delay is required to match old behavior that forced navigation
7016
+ // to always be async
6938
7017
  switchMap((/**
6939
7018
  * @param {?} t
6940
7019
  * @return {?}
@@ -6984,9 +7063,9 @@ class Router {
6984
7063
  /** @type {?} */
6985
7064
  const processPreviousUrl = urlTransition && this.rawUrlTree &&
6986
7065
  this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);
6987
- /* When the current URL shouldn't be processed, but the previous one was, we
6988
- * handle this "error condition" by navigating to the previously successful URL,
6989
- * but leaving the URL intact.*/
7066
+ /* When the current URL shouldn't be processed, but the previous one was,
7067
+ * we handle this "error condition" by navigating to the previously
7068
+ * successful URL, but leaving the URL intact.*/
6990
7069
  if (processPreviousUrl) {
6991
7070
  const { id, extractedUrl, source, restoredState, extras } = t;
6992
7071
  /** @type {?} */
@@ -6997,9 +7076,10 @@ class Router {
6997
7076
  return of(Object.assign(Object.assign({}, t), { targetSnapshot, urlAfterRedirects: extractedUrl, extras: Object.assign(Object.assign({}, extras), { skipLocationChange: false, replaceUrl: false }) }));
6998
7077
  }
6999
7078
  else {
7000
- /* When neither the current or previous URL can be processed, do nothing other
7001
- * than update router's internal reference to the current "settled" URL. This
7002
- * way the next navigation will be coming from the current URL in the browser.
7079
+ /* When neither the current or previous URL can be processed, do nothing
7080
+ * other than update router's internal reference to the current "settled"
7081
+ * URL. This way the next navigation will be coming from the current URL
7082
+ * in the browser.
7003
7083
  */
7004
7084
  this.rawUrlTree = t.rawUrl;
7005
7085
  this.browserUrlTree = t.urlAfterRedirects;
@@ -7125,18 +7205,19 @@ class Router {
7125
7205
  const targetRouterState = createRouterState(this.routeReuseStrategy, (/** @type {?} */ (t.targetSnapshot)), t.currentRouterState);
7126
7206
  return (Object.assign(Object.assign({}, t), { targetRouterState }));
7127
7207
  })),
7128
- /* Once here, we are about to activate syncronously. The assumption is this will
7129
- succeed, and user code may read from the Router service. Therefore before
7130
- activation, we need to update router properties storing the current URL and the
7131
- RouterState, as well as updated the browser URL. All this should happen *before*
7132
- activating. */
7208
+ /* Once here, we are about to activate syncronously. The assumption is this
7209
+ will succeed, and user code may read from the Router service. Therefore
7210
+ before activation, we need to update router properties storing the current
7211
+ URL and the RouterState, as well as updated the browser URL. All this should
7212
+ happen *before* activating. */
7133
7213
  tap((/**
7134
7214
  * @param {?} t
7135
7215
  * @return {?}
7136
7216
  */
7137
7217
  (t) => {
7138
7218
  this.currentUrlTree = t.urlAfterRedirects;
7139
- this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);
7219
+ this.rawUrlTree =
7220
+ this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);
7140
7221
  ((/** @type {?} */ (this))).routerState = (/** @type {?} */ (t.targetRouterState));
7141
7222
  if (this.urlUpdateStrategy === 'deferred') {
7142
7223
  if (!t.extras.skipLocationChange) {
@@ -7148,28 +7229,38 @@ class Router {
7148
7229
  * @param {?} evt
7149
7230
  * @return {?}
7150
7231
  */
7151
- (evt) => this.triggerEvent(evt))), tap({ /**
7232
+ (evt) => this.triggerEvent(evt))), tap({
7233
+ /**
7152
7234
  * @return {?}
7153
7235
  */
7154
- next() { completed = true; }, /**
7236
+ next() {
7237
+ completed = true;
7238
+ },
7239
+ /**
7155
7240
  * @return {?}
7156
7241
  */
7157
- complete() { completed = true; } }), finalize((/**
7242
+ complete() {
7243
+ completed = true;
7244
+ }
7245
+ }), finalize((/**
7158
7246
  * @return {?}
7159
7247
  */
7160
7248
  () => {
7161
- /* When the navigation stream finishes either through error or success, we set the
7162
- * `completed` or `errored` flag. However, there are some situations where we could
7163
- * get here without either of those being set. For instance, a redirect during
7164
- * NavigationStart. Therefore, this is a catch-all to make sure the NavigationCancel
7165
- * event is fired when a navigation gets cancelled but not caught by other means. */
7249
+ /* When the navigation stream finishes either through error or success, we
7250
+ * set the `completed` or `errored` flag. However, there are some situations
7251
+ * where we could get here without either of those being set. For instance, a
7252
+ * redirect during NavigationStart. Therefore, this is a catch-all to make
7253
+ * sure the NavigationCancel
7254
+ * event is fired when a navigation gets cancelled but not caught by other
7255
+ * means. */
7166
7256
  if (!completed && !errored) {
7167
- // Must reset to current URL tree here to ensure history.state is set. On a fresh
7168
- // page load, if a new navigation comes in before a successful navigation
7169
- // completes, there will be nothing in history.state.navigationId. This can cause
7170
- // sync problems with AngularJS sync code which looks for a value here in order
7171
- // to determine whether or not to handle a given popstate event or to leave it
7172
- // to the Angualr router.
7257
+ // Must reset to current URL tree here to ensure history.state is set. On a
7258
+ // fresh page load, if a new navigation comes in before a successful
7259
+ // navigation completes, there will be nothing in
7260
+ // history.state.navigationId. This can cause sync problems with AngularJS
7261
+ // sync code which looks for a value here in order to determine whether or
7262
+ // not to handle a given popstate event or to leave it to the Angualr
7263
+ // router.
7173
7264
  this.resetUrlToCurrentUrlTree();
7174
7265
  /** @type {?} */
7175
7266
  const navCancel = new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), `Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);
@@ -7177,8 +7268,8 @@ class Router {
7177
7268
  t.resolve(false);
7178
7269
  }
7179
7270
  // currentNavigation should always be reset to null here. If navigation was
7180
- // successful, lastSuccessfulTransition will have already been set. Therefore we
7181
- // can safely set currentNavigation to null here.
7271
+ // successful, lastSuccessfulTransition will have already been set. Therefore
7272
+ // we can safely set currentNavigation to null here.
7182
7273
  this.currentNavigation = null;
7183
7274
  })), catchError((/**
7184
7275
  * @param {?} e
@@ -7186,17 +7277,17 @@ class Router {
7186
7277
  */
7187
7278
  (e) => {
7188
7279
  errored = true;
7189
- /* This error type is issued during Redirect, and is handled as a cancellation
7190
- * rather than an error. */
7280
+ /* This error type is issued during Redirect, and is handled as a
7281
+ * cancellation rather than an error. */
7191
7282
  if (isNavigationCancelingError(e)) {
7192
7283
  /** @type {?} */
7193
7284
  const redirecting = isUrlTree(e.url);
7194
7285
  if (!redirecting) {
7195
7286
  // Set property only if we're not redirecting. If we landed on a page and
7196
- // redirect to `/` route, the new navigation is going to see the `/` isn't
7197
- // a change from the default currentUrlTree and won't navigate. This is
7198
- // only applicable with initial navigation, so setting `navigated` only when
7199
- // not redirecting resolves this scenario.
7287
+ // redirect to `/` route, the new navigation is going to see the `/`
7288
+ // isn't a change from the default currentUrlTree and won't navigate.
7289
+ // This is only applicable with initial navigation, so setting
7290
+ // `navigated` only when not redirecting resolves this scenario.
7200
7291
  this.navigated = true;
7201
7292
  this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);
7202
7293
  }
@@ -7227,8 +7318,8 @@ class Router {
7227
7318
  return this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });
7228
7319
  }), 0);
7229
7320
  }
7230
- /* All other errors should reset to the router's internal URL reference to the
7231
- * pre-error state. */
7321
+ /* All other errors should reset to the router's internal URL reference to
7322
+ * the pre-error state. */
7232
7323
  }
7233
7324
  else {
7234
7325
  this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);
@@ -7315,7 +7406,9 @@ class Router {
7315
7406
  setTimeout((/**
7316
7407
  * @return {?}
7317
7408
  */
7318
- () => { this.scheduleNavigation(rawUrlTree, source, state, { replaceUrl: true }); }), 0);
7409
+ () => {
7410
+ this.scheduleNavigation(rawUrlTree, source, state, { replaceUrl: true });
7411
+ }), 0);
7319
7412
  }))));
7320
7413
  }
7321
7414
  }
@@ -7323,18 +7416,24 @@ class Router {
7323
7416
  * The current URL.
7324
7417
  * @return {?}
7325
7418
  */
7326
- get url() { return this.serializeUrl(this.currentUrlTree); }
7419
+ get url() {
7420
+ return this.serializeUrl(this.currentUrlTree);
7421
+ }
7327
7422
  /**
7328
7423
  * The current Navigation object if one exists
7329
7424
  * @return {?}
7330
7425
  */
7331
- getCurrentNavigation() { return this.currentNavigation; }
7426
+ getCurrentNavigation() {
7427
+ return this.currentNavigation;
7428
+ }
7332
7429
  /**
7333
7430
  * \@internal
7334
7431
  * @param {?} event
7335
7432
  * @return {?}
7336
7433
  */
7337
- triggerEvent(event) { ((/** @type {?} */ (this.events))).next(event); }
7434
+ triggerEvent(event) {
7435
+ ((/** @type {?} */ (this.events))).next(event);
7436
+ }
7338
7437
  /**
7339
7438
  * Resets the configuration used for navigation and generating links.
7340
7439
  *
@@ -7362,7 +7461,9 @@ class Router {
7362
7461
  * \@docsNotRequired
7363
7462
  * @return {?}
7364
7463
  */
7365
- ngOnDestroy() { this.dispose(); }
7464
+ ngOnDestroy() {
7465
+ this.dispose();
7466
+ }
7366
7467
  /**
7367
7468
  * Disposes of the router.
7368
7469
  * @return {?}
@@ -7519,7 +7620,9 @@ class Router {
7519
7620
  * @param {?} url
7520
7621
  * @return {?}
7521
7622
  */
7522
- serializeUrl(url) { return this.urlSerializer.serialize(url); }
7623
+ serializeUrl(url) {
7624
+ return this.urlSerializer.serialize(url);
7625
+ }
7523
7626
  /**
7524
7627
  * Parses a string into a `UrlTree`
7525
7628
  * @param {?} url
@@ -7591,7 +7694,9 @@ class Router {
7591
7694
  * @param {?} e
7592
7695
  * @return {?}
7593
7696
  */
7594
- e => { this.console.warn(`Unhandled Navigation Error: `); }));
7697
+ e => {
7698
+ this.console.warn(`Unhandled Navigation Error: `);
7699
+ }));
7595
7700
  }
7596
7701
  /**
7597
7702
  * @private
@@ -7655,7 +7760,12 @@ class Router {
7655
7760
  source,
7656
7761
  restoredState,
7657
7762
  currentUrlTree: this.currentUrlTree,
7658
- currentRawUrl: this.rawUrlTree, rawUrl, extras, resolve, reject, promise,
7763
+ currentRawUrl: this.rawUrlTree,
7764
+ rawUrl,
7765
+ extras,
7766
+ resolve,
7767
+ reject,
7768
+ promise,
7659
7769
  currentSnapshot: this.routerState.snapshot,
7660
7770
  currentRouterState: this.routerState
7661
7771
  });
@@ -7665,7 +7775,9 @@ class Router {
7665
7775
  * @param {?} e
7666
7776
  * @return {?}
7667
7777
  */
7668
- (e) => { return Promise.reject(e); }));
7778
+ (e) => {
7779
+ return Promise.reject(e);
7780
+ }));
7669
7781
  }
7670
7782
  /**
7671
7783
  * @private
@@ -8044,6 +8156,7 @@ class RouterLink {
8044
8156
  const extras = {
8045
8157
  skipLocationChange: attrBoolValue(this.skipLocationChange),
8046
8158
  replaceUrl: attrBoolValue(this.replaceUrl),
8159
+ state: this.state,
8047
8160
  };
8048
8161
  this.router.navigateByUrl(this.urlTree, extras);
8049
8162
  return true;
@@ -8179,11 +8292,15 @@ class RouterLinkWithHref {
8179
8292
  * @param {?} changes
8180
8293
  * @return {?}
8181
8294
  */
8182
- ngOnChanges(changes) { this.updateTargetUrlAndHref(); }
8295
+ ngOnChanges(changes) {
8296
+ this.updateTargetUrlAndHref();
8297
+ }
8183
8298
  /**
8184
8299
  * @return {?}
8185
8300
  */
8186
- ngOnDestroy() { this.subscription.unsubscribe(); }
8301
+ ngOnDestroy() {
8302
+ this.subscription.unsubscribe();
8303
+ }
8187
8304
  /**
8188
8305
  * @param {?} button
8189
8306
  * @param {?} ctrlKey
@@ -8431,11 +8548,15 @@ class RouterLinkActive {
8431
8548
  * @param {?} changes
8432
8549
  * @return {?}
8433
8550
  */
8434
- ngOnChanges(changes) { this.update(); }
8551
+ ngOnChanges(changes) {
8552
+ this.update();
8553
+ }
8435
8554
  /**
8436
8555
  * @return {?}
8437
8556
  */
8438
- ngOnDestroy() { this.subscription.unsubscribe(); }
8557
+ ngOnDestroy() {
8558
+ this.subscription.unsubscribe();
8559
+ }
8439
8560
  /**
8440
8561
  * @private
8441
8562
  * @return {?}
@@ -8645,7 +8766,9 @@ class ChildrenOutletContexts {
8645
8766
  * @param {?} contexts
8646
8767
  * @return {?}
8647
8768
  */
8648
- onOutletReAttached(contexts) { this.contexts = contexts; }
8769
+ onOutletReAttached(contexts) {
8770
+ this.contexts = contexts;
8771
+ }
8649
8772
  /**
8650
8773
  * @param {?} childName
8651
8774
  * @return {?}
@@ -8663,7 +8786,9 @@ class ChildrenOutletContexts {
8663
8786
  * @param {?} childName
8664
8787
  * @return {?}
8665
8788
  */
8666
- getContext(childName) { return this.contexts.get(childName) || null; }
8789
+ getContext(childName) {
8790
+ return this.contexts.get(childName) || null;
8791
+ }
8667
8792
  }
8668
8793
  if (false) {
8669
8794
  /**
@@ -8727,7 +8852,9 @@ class RouterOutlet {
8727
8852
  /**
8728
8853
  * @return {?}
8729
8854
  */
8730
- ngOnDestroy() { this.parentContexts.onChildOutletDestroyed(this.name); }
8855
+ ngOnDestroy() {
8856
+ this.parentContexts.onChildOutletDestroyed(this.name);
8857
+ }
8731
8858
  /**
8732
8859
  * @return {?}
8733
8860
  */
@@ -8752,7 +8879,9 @@ class RouterOutlet {
8752
8879
  /**
8753
8880
  * @return {?}
8754
8881
  */
8755
- get isActivated() { return !!this.activated; }
8882
+ get isActivated() {
8883
+ return !!this.activated;
8884
+ }
8756
8885
  /**
8757
8886
  * @return {?}
8758
8887
  */
@@ -9007,7 +9136,9 @@ class NoPreloading {
9007
9136
  * @param {?} fn
9008
9137
  * @return {?}
9009
9138
  */
9010
- preload(route, fn) { return of(null); }
9139
+ preload(route, fn) {
9140
+ return of(null);
9141
+ }
9011
9142
  }
9012
9143
  /**
9013
9144
  * The preloader optimistically loads all router configurations to
@@ -9080,7 +9211,9 @@ class RouterPreloader {
9080
9211
  /**
9081
9212
  * @return {?}
9082
9213
  */
9083
- ngOnDestroy() { this.subscription.unsubscribe(); }
9214
+ ngOnDestroy() {
9215
+ this.subscription.unsubscribe();
9216
+ }
9084
9217
  /**
9085
9218
  * @private
9086
9219
  * @param {?} ngModule
@@ -9465,9 +9598,7 @@ class RouterModule {
9465
9598
  {
9466
9599
  provide: LocationStrategy,
9467
9600
  useFactory: provideLocationStrategy,
9468
- deps: [
9469
- PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION
9470
- ]
9601
+ deps: [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]
9471
9602
  },
9472
9603
  {
9473
9604
  provide: RouterScroller,
@@ -9994,7 +10125,7 @@ function provideRouterInitializer() {
9994
10125
  * \@publicApi
9995
10126
  * @type {?}
9996
10127
  */
9997
- const VERSION = new Version('9.1.0');
10128
+ const VERSION = new Version('9.1.4');
9998
10129
 
9999
10130
  /**
10000
10131
  * @fileoverview added by tsickle