@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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v5.2.4
2
+ * @license Angular v5.2.5
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v5.2.4
2
+ * @license Angular v5.2.5
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/esm5/router.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v5.2.4
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
- // applied the new router state
5454
- // this operation has side effects
5455
- var /** @type {?} */ navigationIsSuccessful;
5456
- var /** @type {?} */ storedState = _this.routerState;
5457
- var /** @type {?} */ storedUrl = _this.currentUrlTree;
5458
- routerState$
5459
- .forEach(function (_a) {
5460
- var appliedUrl = _a.appliedUrl, state = _a.state, shouldActivate = _a.shouldActivate;
5461
- if (!shouldActivate || id !== _this.navigationId) {
5462
- navigationIsSuccessful = false;
5463
- return;
5464
- }
5465
- _this.currentUrlTree = appliedUrl;
5466
- _this.rawUrlTree = _this.urlHandlingStrategy.merge(_this.currentUrlTree, rawUrl);
5467
- (/** @type {?} */ (_this)).routerState = state;
5468
- if (!skipLocationChange) {
5469
- var /** @type {?} */ path = _this.urlSerializer.serialize(_this.rawUrlTree);
5470
- if (_this.location.isCurrentPathEqualTo(path) || replaceUrl) {
5471
- _this.location.replaceState(path);
5472
- }
5473
- else {
5474
- _this.location.go(path);
5475
- }
5476
- }
5477
- new ActivateRoutes(_this.routeReuseStrategy, state, storedState, function (evt) { return _this.triggerEvent(evt); })
5478
- .activate(_this.rootContexts);
5479
- navigationIsSuccessful = true;
5480
- })
5481
- .then(function () {
5482
- if (navigationIsSuccessful) {
5483
- _this.navigated = true;
5484
- (/** @type {?} */ (_this.events))
5485
- .next(new NavigationEnd(id, _this.serializeUrl(url), _this.serializeUrl(_this.currentUrlTree)));
5486
- resolvePromise(true);
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.resetUrlToCurrentUrlTree();
5490
- (/** @type {?} */ (_this.events))
5491
- .next(new NavigationCancel(id, _this.serializeUrl(url), ''));
5492
- resolvePromise(false);
5507
+ _this.location.go(path);
5493
5508
  }
5494
- }, function (e) {
5495
- if (isNavigationCancelingError(e)) {
5496
- _this.navigated = true;
5497
- _this.resetStateAndUrl(storedState, storedUrl, rawUrl);
5498
- (/** @type {?} */ (_this.events))
5499
- .next(new NavigationCancel(id, _this.serializeUrl(url), e.message));
5500
- resolvePromise(false);
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
- else {
5503
- _this.resetStateAndUrl(storedState, storedUrl, rawUrl);
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.4');
7440
+ var VERSION = new Version('5.2.5');
7409
7441
 
7410
7442
  /**
7411
7443
  * @fileoverview added by tsickle