@angular/router 7.2.10 → 7.2.14
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 +43 -29
- 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/src/config.js +3 -2
- package/esm2015/src/interfaces.js +2 -2
- package/esm2015/src/router.js +14 -14
- package/esm2015/src/router_module.js +42 -45
- package/esm2015/src/router_state.js +4 -4
- package/esm2015/src/version.js +1 -1
- package/esm5/src/config.js +1 -1
- package/esm5/src/interfaces.js +1 -1
- package/esm5/src/router.js +14 -14
- package/esm5/src/router_module.js +26 -12
- package/esm5/src/router_state.js +4 -4
- package/esm5/src/version.js +1 -1
- package/fesm2015/router.js +42 -28
- package/fesm2015/router.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm2015/upgrade.js +1 -1
- package/fesm5/router.js +43 -29
- 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.metadata.json +1 -1
- package/src/config.d.ts +2 -1
- package/src/interfaces.d.ts +1 -1
- package/src/router_module.d.ts +50 -53
- package/src/router_state.d.ts +3 -3
- package/testing.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 v7.2.
|
|
2
|
+
* @license Angular v7.2.14
|
|
3
3
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1489,10 +1489,10 @@ function createEmptyStateSnapshot(urlTree, rootComponent) {
|
|
|
1489
1489
|
* @Component({...})
|
|
1490
1490
|
* class MyComponent {
|
|
1491
1491
|
* constructor(route: ActivatedRoute) {
|
|
1492
|
-
* const id: Observable<string> = route.params.map(p => p.id);
|
|
1493
|
-
* const url: Observable<string> = route.url.map(segments => segments.join(''));
|
|
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
1494
|
* // route.data includes both `data` and `resolve`
|
|
1495
|
-
* const user = route.data.map(d => d.user);
|
|
1495
|
+
* const user = route.data.pipe(map(d => d.user));
|
|
1496
1496
|
* }
|
|
1497
1497
|
* }
|
|
1498
1498
|
* ```
|
|
@@ -3816,23 +3816,23 @@ var Router = /** @class */ (function () {
|
|
|
3816
3816
|
return transitions.pipe(filter(function (t) { return t.id !== 0; }),
|
|
3817
3817
|
// Extract URL
|
|
3818
3818
|
map(function (t) { return (__assign({}, t, { extractedUrl: _this.urlHandlingStrategy.extract(t.rawUrl) })); }),
|
|
3819
|
-
// Store the Navigation object
|
|
3820
|
-
tap(function (t) {
|
|
3821
|
-
_this.currentNavigation = {
|
|
3822
|
-
id: t.id,
|
|
3823
|
-
initialUrl: t.currentRawUrl,
|
|
3824
|
-
extractedUrl: t.extractedUrl,
|
|
3825
|
-
trigger: t.source,
|
|
3826
|
-
extras: t.extras,
|
|
3827
|
-
previousNavigation: _this.lastSuccessfulNavigation ? __assign({}, _this.lastSuccessfulNavigation, { previousNavigation: null }) :
|
|
3828
|
-
null
|
|
3829
|
-
};
|
|
3830
|
-
}),
|
|
3831
3819
|
// Using switchMap so we cancel executing navigations when a new one comes in
|
|
3832
3820
|
switchMap(function (t) {
|
|
3833
3821
|
var completed = false;
|
|
3834
3822
|
var errored = false;
|
|
3835
|
-
return of(t).pipe(
|
|
3823
|
+
return of(t).pipe(
|
|
3824
|
+
// Store the Navigation object
|
|
3825
|
+
tap(function (t) {
|
|
3826
|
+
_this.currentNavigation = {
|
|
3827
|
+
id: t.id,
|
|
3828
|
+
initialUrl: t.currentRawUrl,
|
|
3829
|
+
extractedUrl: t.extractedUrl,
|
|
3830
|
+
trigger: t.source,
|
|
3831
|
+
extras: t.extras,
|
|
3832
|
+
previousNavigation: _this.lastSuccessfulNavigation ? __assign({}, _this.lastSuccessfulNavigation, { previousNavigation: null }) :
|
|
3833
|
+
null
|
|
3834
|
+
};
|
|
3835
|
+
}), switchMap(function (t) {
|
|
3836
3836
|
var urlTransition = !_this.navigated || t.extractedUrl.toString() !== _this.browserUrlTree.toString();
|
|
3837
3837
|
var processCurrentUrl = (_this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&
|
|
3838
3838
|
_this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);
|
|
@@ -5457,18 +5457,32 @@ var RouterModule = /** @class */ (function () {
|
|
|
5457
5457
|
* Creates a module with all the router providers and directives. It also optionally sets up an
|
|
5458
5458
|
* application listener to perform an initial navigation.
|
|
5459
5459
|
*
|
|
5460
|
-
* Options
|
|
5461
|
-
*
|
|
5462
|
-
* * `
|
|
5460
|
+
* Configuration Options:
|
|
5461
|
+
*
|
|
5462
|
+
* * `enableTracing` Toggles whether the router should log all navigation events to the console.
|
|
5463
|
+
* * `useHash` Enables the location strategy that uses the URL fragment instead of the history
|
|
5463
5464
|
* API.
|
|
5464
|
-
* * `initialNavigation`
|
|
5465
|
-
* * `errorHandler`
|
|
5466
|
-
* * `preloadingStrategy`
|
|
5467
|
-
* * `onSameUrlNavigation`
|
|
5468
|
-
*
|
|
5469
|
-
* * `
|
|
5470
|
-
*
|
|
5471
|
-
|
|
5465
|
+
* * `initialNavigation` Disables the initial navigation.
|
|
5466
|
+
* * `errorHandler` Defines a custom error handler for failed navigations.
|
|
5467
|
+
* * `preloadingStrategy` Configures a preloading strategy. See `PreloadAllModules`.
|
|
5468
|
+
* * `onSameUrlNavigation` Define what the router should do if it receives a navigation request to
|
|
5469
|
+
* the current URL.
|
|
5470
|
+
* * `scrollPositionRestoration` Configures if the scroll position needs to be restored when
|
|
5471
|
+
* navigating back.
|
|
5472
|
+
* * `anchorScrolling` Configures if the router should scroll to the element when the url has a
|
|
5473
|
+
* fragment.
|
|
5474
|
+
* * `scrollOffset` Configures the scroll offset the router will use when scrolling to an element.
|
|
5475
|
+
* * `paramsInheritanceStrategy` Defines how the router merges params, data and resolved data from
|
|
5476
|
+
* parent to child routes.
|
|
5477
|
+
* * `malformedUriErrorHandler` Defines a custom malformed uri error handler function. This
|
|
5478
|
+
* handler is invoked when encodedURI contains invalid character sequences.
|
|
5479
|
+
* * `urlUpdateStrategy` Defines when the router updates the browser URL. The default behavior is
|
|
5480
|
+
* to update after successful navigation.
|
|
5481
|
+
* * `relativeLinkResolution` Enables the correct relative link resolution in components with
|
|
5482
|
+
* empty paths.
|
|
5483
|
+
*
|
|
5484
|
+
* See `ExtraOptions` for more details about the above options.
|
|
5485
|
+
*/
|
|
5472
5486
|
RouterModule.forRoot = function (routes, config) {
|
|
5473
5487
|
return {
|
|
5474
5488
|
ngModule: RouterModule_1,
|
|
@@ -5726,7 +5740,7 @@ function provideRouterInitializer() {
|
|
|
5726
5740
|
/**
|
|
5727
5741
|
* @publicApi
|
|
5728
5742
|
*/
|
|
5729
|
-
var VERSION = new Version('7.2.
|
|
5743
|
+
var VERSION = new Version('7.2.14');
|
|
5730
5744
|
|
|
5731
5745
|
/**
|
|
5732
5746
|
* @license
|