@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.
- package/bundles/router-testing.umd.js +1 -1
- package/bundles/router-testing.umd.min.js +1 -1
- package/bundles/router-testing.umd.min.js.map +1 -1
- package/bundles/router-upgrade.umd.js +1 -1
- package/bundles/router-upgrade.umd.min.js +1 -1
- package/bundles/router-upgrade.umd.min.js.map +1 -1
- package/bundles/router.umd.js +17 -15
- package/bundles/router.umd.js.map +1 -1
- package/bundles/router.umd.min.js +4 -4
- package/bundles/router.umd.min.js.map +1 -1
- package/esm2015/src/router.js +10 -2
- package/esm2015/src/router_state.js +3 -12
- package/esm2015/src/utils/collection.js +8 -4
- package/esm2015/src/version.js +1 -1
- package/esm5/src/router.js +9 -2
- package/esm5/src/router_state.js +3 -12
- package/esm5/src/utils/collection.js +6 -2
- package/esm5/src/version.js +1 -1
- package/fesm2015/router.js +20 -17
- package/fesm2015/router.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm2015/upgrade.js +1 -1
- package/fesm5/router.js +17 -15
- package/fesm5/router.js.map +1 -1
- package/fesm5/testing.js +1 -1
- package/fesm5/upgrade.js +1 -1
- package/package.json +4 -4
- package/router.d.ts +3 -12
- package/router.metadata.json +1 -1
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
- package/upgrade/upgrade.d.ts +1 -1
- package/upgrade.d.ts +1 -1
package/fesm2015/testing.js
CHANGED
package/fesm2015/upgrade.js
CHANGED
package/fesm5/router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v8.0.
|
|
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
|
-
*
|
|
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 () {
|
|
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.
|
|
5753
|
+
var VERSION = new Version('8.0.1');
|
|
5752
5754
|
|
|
5753
5755
|
/**
|
|
5754
5756
|
* @license
|