@angular/router 6.0.0-rc.3 → 6.0.0

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 (75) hide show
  1. package/bundles/router-testing.umd.js +54 -9
  2. package/bundles/router-testing.umd.js.map +1 -1
  3. package/bundles/router-testing.umd.min.js +5 -4
  4. package/bundles/router-testing.umd.min.js.map +1 -1
  5. package/bundles/router-upgrade.umd.js +3 -3
  6. package/bundles/router-upgrade.umd.js.map +1 -1
  7. package/bundles/router-upgrade.umd.min.js +2 -2
  8. package/bundles/router-upgrade.umd.min.js.map +1 -1
  9. package/bundles/router.umd.js +163 -78
  10. package/bundles/router.umd.js.map +1 -1
  11. package/bundles/router.umd.min.js +19 -19
  12. package/bundles/router.umd.min.js.map +1 -1
  13. package/esm2015/src/config.js +2 -2
  14. package/esm2015/src/create_router_state.js +12 -9
  15. package/esm2015/src/directives/router_link.js +3 -3
  16. package/esm2015/src/directives/router_link_active.js +2 -2
  17. package/esm2015/src/directives/router_outlet.js +2 -2
  18. package/esm2015/src/events.js +6 -6
  19. package/esm2015/src/interfaces.js +6 -6
  20. package/esm2015/src/router.js +3 -3
  21. package/esm2015/src/router_module.js +6 -6
  22. package/esm2015/src/router_outlet_context.js +3 -3
  23. package/esm2015/src/router_preloader.js +2 -2
  24. package/esm2015/src/router_state.js +5 -5
  25. package/esm2015/src/shared.js +4 -4
  26. package/esm2015/src/url_tree.js +6 -6
  27. package/esm2015/src/version.js +3 -3
  28. package/esm2015/testing/src/router_testing_module.js +4 -4
  29. package/esm5/src/config.js +1 -1
  30. package/esm5/src/create_router_state.js +12 -9
  31. package/esm5/src/directives/router_link.js +3 -3
  32. package/esm5/src/directives/router_link_active.js +2 -2
  33. package/esm5/src/directives/router_outlet.js +2 -2
  34. package/esm5/src/events.js +16 -16
  35. package/esm5/src/interfaces.js +1 -1
  36. package/esm5/src/router.js +4 -4
  37. package/esm5/src/router_module.js +5 -5
  38. package/esm5/src/router_outlet_context.js +7 -7
  39. package/esm5/src/router_preloader.js +2 -2
  40. package/esm5/src/router_state.js +13 -13
  41. package/esm5/src/shared.js +3 -3
  42. package/esm5/src/url_tree.js +16 -16
  43. package/esm5/src/version.js +3 -3
  44. package/esm5/testing/src/router_testing_module.js +4 -4
  45. package/fesm2015/router.js +46 -43
  46. package/fesm2015/router.js.map +1 -1
  47. package/fesm2015/testing.js +4 -4
  48. package/fesm2015/testing.js.map +1 -1
  49. package/fesm2015/upgrade.js +1 -1
  50. package/fesm2015/upgrade.js.map +1 -1
  51. package/fesm5/router.js +42 -39
  52. package/fesm5/router.js.map +1 -1
  53. package/fesm5/testing.js +4 -4
  54. package/fesm5/testing.js.map +1 -1
  55. package/fesm5/upgrade.js +1 -1
  56. package/fesm5/upgrade.js.map +1 -1
  57. package/package.json +7 -6
  58. package/router.metadata.json +1 -1
  59. package/src/config.d.ts +7 -7
  60. package/src/directives/router_link.d.ts +2 -2
  61. package/src/directives/router_link_active.d.ts +1 -1
  62. package/src/directives/router_outlet.d.ts +1 -1
  63. package/src/events.d.ts +6 -6
  64. package/src/interfaces.d.ts +5 -5
  65. package/src/router.d.ts +3 -3
  66. package/src/router_module.d.ts +4 -4
  67. package/src/router_outlet_context.d.ts +2 -2
  68. package/src/router_preloader.d.ts +1 -1
  69. package/src/router_state.d.ts +4 -4
  70. package/src/shared.d.ts +4 -4
  71. package/src/url_tree.d.ts +5 -5
  72. package/src/version.d.ts +1 -1
  73. package/testing/src/router_testing_module.d.ts +3 -3
  74. package/testing.d.ts +1 -1
  75. package/upgrade.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v6.0.0-rc.3
2
+ * @license Angular v6.0.0
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -56,7 +56,7 @@ class RouterEvent {
56
56
  *
57
57
  * Represents an event triggered when a navigation starts.
58
58
  *
59
- * \@stable
59
+ *
60
60
  */
61
61
  class NavigationStart extends RouterEvent {
62
62
  /**
@@ -89,7 +89,7 @@ class NavigationStart extends RouterEvent {
89
89
  *
90
90
  * Represents an event triggered when a navigation ends successfully.
91
91
  *
92
- * \@stable
92
+ *
93
93
  */
94
94
  class NavigationEnd extends RouterEvent {
95
95
  /**
@@ -118,7 +118,7 @@ class NavigationEnd extends RouterEvent {
118
118
  *
119
119
  * Represents an event triggered when a navigation is canceled.
120
120
  *
121
- * \@stable
121
+ *
122
122
  */
123
123
  class NavigationCancel extends RouterEvent {
124
124
  /**
@@ -145,7 +145,7 @@ class NavigationCancel extends RouterEvent {
145
145
  *
146
146
  * Represents an event triggered when a navigation fails due to an unexpected error.
147
147
  *
148
- * \@stable
148
+ *
149
149
  */
150
150
  class NavigationError extends RouterEvent {
151
151
  /**
@@ -174,7 +174,7 @@ class NavigationError extends RouterEvent {
174
174
  *
175
175
  * Represents an event triggered when routes are recognized.
176
176
  *
177
- * \@stable
177
+ *
178
178
  */
179
179
  class RoutesRecognized extends RouterEvent {
180
180
  /**
@@ -473,7 +473,7 @@ class ActivationEnd {
473
473
  *
474
474
  * Name of the primary outlet.
475
475
  *
476
- * \@stable
476
+ *
477
477
  */
478
478
  const PRIMARY_OUTLET = 'primary';
479
479
  /**
@@ -486,7 +486,7 @@ const PRIMARY_OUTLET = 'primary';
486
486
  * The API is inspired by the URLSearchParams interface.
487
487
  * see https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
488
488
  *
489
- * \@stable
489
+ *
490
490
  * @record
491
491
  */
492
492
 
@@ -530,7 +530,7 @@ class ParamsAsMap {
530
530
  /**
531
531
  * Convert a `Params` instance to a `ParamMap`.
532
532
  *
533
- * \@stable
533
+ *
534
534
  * @param {?} params
535
535
  * @return {?}
536
536
  */
@@ -601,7 +601,7 @@ function defaultUrlMatcher(segments, segmentGroup, route) {
601
601
  */
602
602
  /**
603
603
  * See `Routes` for more details.
604
- * \@stable
604
+ *
605
605
  * @record
606
606
  */
607
607
 
@@ -990,7 +990,7 @@ function containsSegmentGroupHelper(container, containee, containeePaths) {
990
990
  * }
991
991
  * ```
992
992
  *
993
- * \@stable
993
+ *
994
994
  */
995
995
  class UrlTree {
996
996
  /**
@@ -1026,7 +1026,7 @@ class UrlTree {
1026
1026
  *
1027
1027
  * See `UrlTree` for more information.
1028
1028
  *
1029
- * \@stable
1029
+ *
1030
1030
  */
1031
1031
  class UrlSegmentGroup {
1032
1032
  /**
@@ -1081,7 +1081,7 @@ class UrlSegmentGroup {
1081
1081
  * }
1082
1082
  * ```
1083
1083
  *
1084
- * \@stable
1084
+ *
1085
1085
  */
1086
1086
  class UrlSegment {
1087
1087
  /**
@@ -1155,7 +1155,7 @@ function mapChildrenIntoArray(segment, fn) {
1155
1155
  *
1156
1156
  * See `DefaultUrlSerializer` for an example of a URL serializer.
1157
1157
  *
1158
- * \@stable
1158
+ *
1159
1159
  * @abstract
1160
1160
  */
1161
1161
  class UrlSerializer {
@@ -1176,7 +1176,7 @@ class UrlSerializer {
1176
1176
  * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to
1177
1177
  * specify route specific parameters.
1178
1178
  *
1179
- * \@stable
1179
+ *
1180
1180
  */
1181
1181
  class DefaultUrlSerializer {
1182
1182
  /**
@@ -2323,7 +2323,7 @@ function nodeChildrenAsMap(node) {
2323
2323
  *
2324
2324
  * See `ActivatedRoute` for more information.
2325
2325
  *
2326
- * \@stable
2326
+ *
2327
2327
  */
2328
2328
  class RouterState extends Tree {
2329
2329
  /**
@@ -2388,7 +2388,7 @@ function createEmptyStateSnapshot(urlTree, rootComponent) {
2388
2388
  * }
2389
2389
  * ```
2390
2390
  *
2391
- * \@stable
2391
+ *
2392
2392
  */
2393
2393
  class ActivatedRoute {
2394
2394
  /**
@@ -2530,7 +2530,7 @@ function flattenInherited(pathFromRoot) {
2530
2530
  * }
2531
2531
  * ```
2532
2532
  *
2533
- * \@stable
2533
+ *
2534
2534
  */
2535
2535
  class ActivatedRouteSnapshot {
2536
2536
  /**
@@ -2636,7 +2636,7 @@ class ActivatedRouteSnapshot {
2636
2636
  * }
2637
2637
  * ```
2638
2638
  *
2639
- * \@stable
2639
+ *
2640
2640
  */
2641
2641
  class RouterStateSnapshot extends Tree {
2642
2642
  /**
@@ -2754,15 +2754,18 @@ function createNode(routeReuseStrategy, curr, prevState) {
2754
2754
  return new TreeNode(value, children);
2755
2755
  // retrieve an activated route that is used to be displayed, but is not currently displayed
2756
2756
  }
2757
- else if (routeReuseStrategy.retrieve(curr.value)) {
2758
- const /** @type {?} */ tree = (/** @type {?} */ (routeReuseStrategy.retrieve(curr.value))).route;
2759
- setFutureSnapshotsOfActivatedRoutes(curr, tree);
2760
- return tree;
2761
- }
2762
2757
  else {
2763
- const /** @type {?} */ value = createActivatedRoute(curr.value);
2764
- const /** @type {?} */ children = curr.children.map(c => createNode(routeReuseStrategy, c));
2765
- return new TreeNode(value, children);
2758
+ const /** @type {?} */ detachedRouteHandle = /** @type {?} */ (routeReuseStrategy.retrieve(curr.value));
2759
+ if (detachedRouteHandle) {
2760
+ const /** @type {?} */ tree = detachedRouteHandle.route;
2761
+ setFutureSnapshotsOfActivatedRoutes(curr, tree);
2762
+ return tree;
2763
+ }
2764
+ else {
2765
+ const /** @type {?} */ value = createActivatedRoute(curr.value);
2766
+ const /** @type {?} */ children = curr.children.map(c => createNode(routeReuseStrategy, c));
2767
+ return new TreeNode(value, children);
2768
+ }
2766
2769
  }
2767
2770
  }
2768
2771
  /**
@@ -4146,7 +4149,7 @@ class DefaultUrlHandlingStrategy {
4146
4149
  *
4147
4150
  * Represents the extra options used during navigation.
4148
4151
  *
4149
- * \@stable
4152
+ *
4150
4153
  * @record
4151
4154
  */
4152
4155
 
@@ -4174,7 +4177,7 @@ function defaultRouterHook(snapshot) {
4174
4177
  *
4175
4178
  * \@ngModule RouterModule
4176
4179
  *
4177
- * \@stable
4180
+ *
4178
4181
  */
4179
4182
  class Router {
4180
4183
  /**
@@ -5095,7 +5098,7 @@ function validateCommands(commands) {
5095
5098
  *
5096
5099
  * \@ngModule RouterModule
5097
5100
  *
5098
- * \@stable
5101
+ *
5099
5102
  */
5100
5103
  class RouterLink {
5101
5104
  /**
@@ -5192,7 +5195,7 @@ RouterLink.propDecorators = {
5192
5195
  *
5193
5196
  * \@ngModule RouterModule
5194
5197
  *
5195
- * \@stable
5198
+ *
5196
5199
  */
5197
5200
  class RouterLinkWithHref {
5198
5201
  /**
@@ -5379,7 +5382,7 @@ function attrBoolValue(s) {
5379
5382
  *
5380
5383
  * \@ngModule RouterModule
5381
5384
  *
5382
- * \@stable
5385
+ *
5383
5386
  */
5384
5387
  class RouterLinkActive {
5385
5388
  /**
@@ -5497,7 +5500,7 @@ RouterLinkActive.propDecorators = {
5497
5500
  /**
5498
5501
  * Store contextual information about a `RouterOutlet`
5499
5502
  *
5500
- * \@stable
5503
+ *
5501
5504
  */
5502
5505
  class OutletContext {
5503
5506
  constructor() {
@@ -5511,7 +5514,7 @@ class OutletContext {
5511
5514
  /**
5512
5515
  * Store contextual information about the children (= nested) `RouterOutlet`
5513
5516
  *
5514
- * \@stable
5517
+ *
5515
5518
  */
5516
5519
  class ChildrenOutletContexts {
5517
5520
  constructor() {
@@ -5607,7 +5610,7 @@ class ChildrenOutletContexts {
5607
5610
  * ```
5608
5611
  * \@ngModule RouterModule
5609
5612
  *
5610
- * \@stable
5613
+ *
5611
5614
  */
5612
5615
  class RouterOutlet {
5613
5616
  /**
@@ -5852,7 +5855,7 @@ class NoPreloading {
5852
5855
  *
5853
5856
  * If a route is protected by `canLoad` guards, the preloaded will not load it.
5854
5857
  *
5855
- * \@stable
5858
+ *
5856
5859
  */
5857
5860
  class RouterPreloader {
5858
5861
  /**
@@ -5957,7 +5960,7 @@ RouterPreloader.ctorParameters = () => [
5957
5960
  *
5958
5961
  * Contains a list of directives
5959
5962
  *
5960
- * \@stable
5963
+ *
5961
5964
  */
5962
5965
  const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive];
5963
5966
  /**
@@ -5965,7 +5968,7 @@ const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterL
5965
5968
  *
5966
5969
  * Is used in DI to configure the router.
5967
5970
  *
5968
- * \@stable
5971
+ *
5969
5972
  */
5970
5973
  const ROUTER_CONFIGURATION = new InjectionToken('ROUTER_CONFIGURATION');
5971
5974
  /**
@@ -6047,7 +6050,7 @@ function routerNgProbeToken() {
6047
6050
  * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an
6048
6051
  * overview of how the router should be used.
6049
6052
  *
6050
- * \@stable
6053
+ *
6051
6054
  */
6052
6055
  class RouterModule {
6053
6056
  /**
@@ -6153,7 +6156,7 @@ function provideForRootGuard(router) {
6153
6156
  * class MyNgModule {}
6154
6157
  * ```
6155
6158
  *
6156
- * \@stable
6159
+ *
6157
6160
  * @param {?} routes
6158
6161
  * @return {?}
6159
6162
  */
@@ -6168,7 +6171,7 @@ function provideRoutes(routes) {
6168
6171
  *
6169
6172
  * Represents options to configure the router.
6170
6173
  *
6171
- * \@stable
6174
+ *
6172
6175
  * @record
6173
6176
  */
6174
6177
 
@@ -6374,9 +6377,9 @@ function provideRouterInitializer() {
6374
6377
  * found in the LICENSE file at https://angular.io/license
6375
6378
  */
6376
6379
  /**
6377
- * \@stable
6380
+ *
6378
6381
  */
6379
- const VERSION = new Version('6.0.0-rc.3');
6382
+ const VERSION = new Version('6.0.0');
6380
6383
 
6381
6384
  /**
6382
6385
  * @fileoverview added by tsickle