@angular/router 5.2.4 → 5.2.5
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 +2 -2
- package/bundles/router-testing.umd.min.js +2 -2
- package/bundles/router-testing.umd.min.js.map +1 -1
- package/bundles/router-upgrade.umd.js +2 -2
- package/bundles/router-upgrade.umd.min.js +2 -2
- package/bundles/router-upgrade.umd.min.js.map +1 -1
- package/bundles/router.umd.js +91 -59
- package/bundles/router.umd.js.map +1 -1
- package/bundles/router.umd.min.js +3 -3
- package/bundles/router.umd.min.js.map +1 -1
- package/esm2015/router.js +73 -57
- package/esm2015/router.js.map +1 -1
- package/esm2015/testing.js +1 -1
- package/esm2015/upgrade.js +1 -1
- package/esm5/router.js +90 -58
- package/esm5/router.js.map +1 -1
- package/esm5/testing.js +1 -1
- package/esm5/upgrade.js +1 -1
- package/package.json +4 -4
- package/router.metadata.json +1 -1
- package/src/router.d.ts +5 -0
- package/testing.d.ts +1 -1
- package/upgrade.d.ts +1 -1
package/esm2015/testing.js
CHANGED
package/esm2015/upgrade.js
CHANGED
package/esm5/router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v5.2.
|
|
2
|
+
* @license Angular v5.2.5
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -5450,67 +5450,99 @@ var Router = /** @class */ (function () {
|
|
|
5450
5450
|
return { appliedUrl: appliedUrl, state: null, shouldActivate: shouldActivate };
|
|
5451
5451
|
}
|
|
5452
5452
|
});
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5453
|
+
_this.activateRoutes(routerState$, _this.routerState, _this.currentUrlTree, id, url, rawUrl, skipLocationChange, replaceUrl, resolvePromise, rejectPromise);
|
|
5454
|
+
});
|
|
5455
|
+
};
|
|
5456
|
+
/**
|
|
5457
|
+
* Performs the logic of activating routes. This is a synchronous process by default. While this
|
|
5458
|
+
* is a private method, it could be overridden to make activation asynchronous.
|
|
5459
|
+
* @param {?} state
|
|
5460
|
+
* @param {?} storedState
|
|
5461
|
+
* @param {?} storedUrl
|
|
5462
|
+
* @param {?} id
|
|
5463
|
+
* @param {?} url
|
|
5464
|
+
* @param {?} rawUrl
|
|
5465
|
+
* @param {?} skipLocationChange
|
|
5466
|
+
* @param {?} replaceUrl
|
|
5467
|
+
* @param {?} resolvePromise
|
|
5468
|
+
* @param {?} rejectPromise
|
|
5469
|
+
* @return {?}
|
|
5470
|
+
*/
|
|
5471
|
+
Router.prototype.activateRoutes = /**
|
|
5472
|
+
* Performs the logic of activating routes. This is a synchronous process by default. While this
|
|
5473
|
+
* is a private method, it could be overridden to make activation asynchronous.
|
|
5474
|
+
* @param {?} state
|
|
5475
|
+
* @param {?} storedState
|
|
5476
|
+
* @param {?} storedUrl
|
|
5477
|
+
* @param {?} id
|
|
5478
|
+
* @param {?} url
|
|
5479
|
+
* @param {?} rawUrl
|
|
5480
|
+
* @param {?} skipLocationChange
|
|
5481
|
+
* @param {?} replaceUrl
|
|
5482
|
+
* @param {?} resolvePromise
|
|
5483
|
+
* @param {?} rejectPromise
|
|
5484
|
+
* @return {?}
|
|
5485
|
+
*/
|
|
5486
|
+
function (state, storedState, storedUrl, id, url, rawUrl, skipLocationChange, replaceUrl, resolvePromise, rejectPromise) {
|
|
5487
|
+
var _this = this;
|
|
5488
|
+
// applied the new router state
|
|
5489
|
+
// this operation has side effects
|
|
5490
|
+
var /** @type {?} */ navigationIsSuccessful;
|
|
5491
|
+
state
|
|
5492
|
+
.forEach(function (_a) {
|
|
5493
|
+
var appliedUrl = _a.appliedUrl, state = _a.state, shouldActivate = _a.shouldActivate;
|
|
5494
|
+
if (!shouldActivate || id !== _this.navigationId) {
|
|
5495
|
+
navigationIsSuccessful = false;
|
|
5496
|
+
return;
|
|
5497
|
+
}
|
|
5498
|
+
_this.currentUrlTree = appliedUrl;
|
|
5499
|
+
_this.rawUrlTree = _this.urlHandlingStrategy.merge(_this.currentUrlTree, rawUrl);
|
|
5500
|
+
(/** @type {?} */ (_this)).routerState = state;
|
|
5501
|
+
if (!skipLocationChange) {
|
|
5502
|
+
var /** @type {?} */ path = _this.urlSerializer.serialize(_this.rawUrlTree);
|
|
5503
|
+
if (_this.location.isCurrentPathEqualTo(path) || replaceUrl) {
|
|
5504
|
+
_this.location.replaceState(path);
|
|
5487
5505
|
}
|
|
5488
5506
|
else {
|
|
5489
|
-
_this.
|
|
5490
|
-
(/** @type {?} */ (_this.events))
|
|
5491
|
-
.next(new NavigationCancel(id, _this.serializeUrl(url), ''));
|
|
5492
|
-
resolvePromise(false);
|
|
5507
|
+
_this.location.go(path);
|
|
5493
5508
|
}
|
|
5494
|
-
}
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5509
|
+
}
|
|
5510
|
+
new ActivateRoutes(_this.routeReuseStrategy, state, storedState, function (evt) { return _this.triggerEvent(evt); })
|
|
5511
|
+
.activate(_this.rootContexts);
|
|
5512
|
+
navigationIsSuccessful = true;
|
|
5513
|
+
})
|
|
5514
|
+
.then(function () {
|
|
5515
|
+
if (navigationIsSuccessful) {
|
|
5516
|
+
_this.navigated = true;
|
|
5517
|
+
(/** @type {?} */ (_this.events))
|
|
5518
|
+
.next(new NavigationEnd(id, _this.serializeUrl(url), _this.serializeUrl(_this.currentUrlTree)));
|
|
5519
|
+
resolvePromise(true);
|
|
5520
|
+
}
|
|
5521
|
+
else {
|
|
5522
|
+
_this.resetUrlToCurrentUrlTree();
|
|
5523
|
+
(/** @type {?} */ (_this.events))
|
|
5524
|
+
.next(new NavigationCancel(id, _this.serializeUrl(url), ''));
|
|
5525
|
+
resolvePromise(false);
|
|
5526
|
+
}
|
|
5527
|
+
}, function (e) {
|
|
5528
|
+
if (isNavigationCancelingError(e)) {
|
|
5529
|
+
_this.navigated = true;
|
|
5530
|
+
_this.resetStateAndUrl(storedState, storedUrl, rawUrl);
|
|
5531
|
+
(/** @type {?} */ (_this.events))
|
|
5532
|
+
.next(new NavigationCancel(id, _this.serializeUrl(url), e.message));
|
|
5533
|
+
resolvePromise(false);
|
|
5534
|
+
}
|
|
5535
|
+
else {
|
|
5536
|
+
_this.resetStateAndUrl(storedState, storedUrl, rawUrl);
|
|
5537
|
+
(/** @type {?} */ (_this.events))
|
|
5538
|
+
.next(new NavigationError(id, _this.serializeUrl(url), e));
|
|
5539
|
+
try {
|
|
5540
|
+
resolvePromise(_this.errorHandler(e));
|
|
5501
5541
|
}
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
(/** @type {?} */ (_this.events))
|
|
5505
|
-
.next(new NavigationError(id, _this.serializeUrl(url), e));
|
|
5506
|
-
try {
|
|
5507
|
-
resolvePromise(_this.errorHandler(e));
|
|
5508
|
-
}
|
|
5509
|
-
catch (/** @type {?} */ ee) {
|
|
5510
|
-
rejectPromise(ee);
|
|
5511
|
-
}
|
|
5542
|
+
catch (/** @type {?} */ ee) {
|
|
5543
|
+
rejectPromise(ee);
|
|
5512
5544
|
}
|
|
5513
|
-
}
|
|
5545
|
+
}
|
|
5514
5546
|
});
|
|
5515
5547
|
};
|
|
5516
5548
|
/**
|
|
@@ -7405,7 +7437,7 @@ function provideRouterInitializer() {
|
|
|
7405
7437
|
/**
|
|
7406
7438
|
* \@stable
|
|
7407
7439
|
*/
|
|
7408
|
-
var VERSION = new Version('5.2.
|
|
7440
|
+
var VERSION = new Version('5.2.5');
|
|
7409
7441
|
|
|
7410
7442
|
/**
|
|
7411
7443
|
* @fileoverview added by tsickle
|