@angular/router 8.0.0-rc.3 → 8.0.1

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v8.0.0-rc.3
2
+ * @license Angular v8.0.1
3
3
  * (c) 2010-2019 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v8.0.0-rc.3
2
+ * @license Angular v8.0.1
3
3
  * (c) 2010-2019 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/fesm5/router.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v8.0.0-rc.3
2
+ * @license Angular v8.0.1
3
3
  * (c) 2010-2019 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -669,9 +669,13 @@ function shallowEqualArrays(a, b) {
669
669
  return true;
670
670
  }
671
671
  function shallowEqual(a, b) {
672
+ // Casting Object.keys return values to include `undefined` as there are some cases
673
+ // in IE 11 where this can happen. Cannot provide a test because the behavior only
674
+ // exists in certain circumstances in IE 11, therefore doing this cast ensures the
675
+ // logic is correct for when this edge case is hit.
672
676
  var k1 = Object.keys(a);
673
677
  var k2 = Object.keys(b);
674
- if (k1.length != k2.length) {
678
+ if (!k1 || !k2 || k1.length != k2.length) {
675
679
  return false;
676
680
  }
677
681
  var key;
@@ -1485,17 +1489,8 @@ function createEmptyStateSnapshot(urlTree, rootComponent) {
1485
1489
  * Contains the information about a route associated with a component loaded in an
1486
1490
  * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.
1487
1491
  *
1488
- * ```
1489
- * @Component({...})
1490
- * class MyComponent {
1491
- * constructor(route: ActivatedRoute) {
1492
- * const id: Observable<string> = route.params.pipe(map(p => p.id));
1493
- * const url: Observable<string> = route.url.pipe(map(segments => segments.join('')));
1494
- * // route.data includes both `data` and `resolve`
1495
- * const user = route.data.pipe(map(d => d.user));
1496
- * }
1497
- * }
1498
- * ```
1492
+ * {@example router/activated-route/module.ts region="activated-route"
1493
+ * header="activated-route.component.ts" linenums="false"}
1499
1494
  *
1500
1495
  * @publicApi
1501
1496
  */
@@ -4047,7 +4042,14 @@ var Router = /** @class */ (function () {
4047
4042
  // this will simplify the lifecycle of the router.
4048
4043
  this.routerState.root.component = this.rootComponentType;
4049
4044
  };
4050
- Router.prototype.getTransition = function () { return this.transitions.value; };
4045
+ Router.prototype.getTransition = function () {
4046
+ var transition = this.transitions.value;
4047
+ // This value needs to be set. Other values such as extractedUrl are set on initial navigation
4048
+ // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not
4049
+ // processing the previous URL.
4050
+ transition.urlAfterRedirects = this.browserUrlTree;
4051
+ return transition;
4052
+ };
4051
4053
  Router.prototype.setTransition = function (t) {
4052
4054
  this.transitions.next(__assign({}, this.getTransition(), t));
4053
4055
  };
@@ -5748,7 +5750,7 @@ function provideRouterInitializer() {
5748
5750
  /**
5749
5751
  * @publicApi
5750
5752
  */
5751
- var VERSION = new Version('8.0.0-rc.3');
5753
+ var VERSION = new Version('8.0.1');
5752
5754
 
5753
5755
  /**
5754
5756
  * @license