@angular/router 7.2.7 → 7.2.11
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.js.map +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 +44 -35
- package/bundles/router.umd.js.map +1 -1
- package/bundles/router.umd.min.js +2 -2
- package/bundles/router.umd.min.js.map +1 -1
- package/esm2015/src/config.js +316 -17
- package/esm2015/src/interfaces.js +11 -11
- package/esm2015/src/router.js +74 -63
- package/esm2015/src/router_config_loader.js +1 -2
- 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 +43 -34
- package/esm5/src/router_config_loader.js +1 -2
- package/esm5/src/version.js +1 -1
- package/fesm2015/router.js +43 -41
- package/fesm2015/router.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/fesm2015/upgrade.js +1 -1
- package/fesm5/router.js +44 -35
- 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 +259 -206
- package/src/interfaces.d.ts +10 -10
- package/src/router.d.ts +45 -36
- package/testing.d.ts +1 -1
- package/upgrade.d.ts +1 -1
package/fesm2015/router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v7.2.
|
|
2
|
+
* @license Angular v7.2.11
|
|
3
3
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -4922,9 +4922,10 @@ function defaultRouterHook(snapshot, runExtras) {
|
|
|
4922
4922
|
/**
|
|
4923
4923
|
* \@description
|
|
4924
4924
|
*
|
|
4925
|
-
*
|
|
4925
|
+
* An NgModule that provides navigation and URL manipulation capabilities.
|
|
4926
4926
|
*
|
|
4927
|
-
*
|
|
4927
|
+
* @see `Route`.
|
|
4928
|
+
* @see [Routing and Navigation Guide](guide/router).
|
|
4928
4929
|
*
|
|
4929
4930
|
* \@ngModule RouterModule
|
|
4930
4931
|
*
|
|
@@ -4953,11 +4954,12 @@ class Router {
|
|
|
4953
4954
|
this.currentNavigation = null;
|
|
4954
4955
|
this.navigationId = 0;
|
|
4955
4956
|
this.isNgZoneEnabled = false;
|
|
4957
|
+
/**
|
|
4958
|
+
* An event stream for routing events in this NgModule.
|
|
4959
|
+
*/
|
|
4956
4960
|
this.events = new Subject();
|
|
4957
4961
|
/**
|
|
4958
|
-
*
|
|
4959
|
-
*
|
|
4960
|
-
* See `ErrorHandler` for more information.
|
|
4962
|
+
* A handler for navigation errors in this NgModule.
|
|
4961
4963
|
*/
|
|
4962
4964
|
this.errorHandler = defaultErrorHandler;
|
|
4963
4965
|
/**
|
|
@@ -4967,13 +4969,16 @@ class Router {
|
|
|
4967
4969
|
*/
|
|
4968
4970
|
this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;
|
|
4969
4971
|
/**
|
|
4970
|
-
*
|
|
4972
|
+
* True if at least one navigation event has occurred,
|
|
4973
|
+
* false otherwise.
|
|
4971
4974
|
*/
|
|
4972
4975
|
this.navigated = false;
|
|
4973
4976
|
this.lastSuccessfulId = -1;
|
|
4974
4977
|
/**
|
|
4975
|
-
*
|
|
4976
|
-
*
|
|
4978
|
+
* Hooks that enable you to pause navigation,
|
|
4979
|
+
* either before or after the preactivation phase.
|
|
4980
|
+
* Used by `RouterModule`.
|
|
4981
|
+
*
|
|
4977
4982
|
* \@internal
|
|
4978
4983
|
*/
|
|
4979
4984
|
this.hooks = {
|
|
@@ -4984,21 +4989,24 @@ class Router {
|
|
|
4984
4989
|
* Extracts and merges URLs. Used for AngularJS to Angular migrations.
|
|
4985
4990
|
*/
|
|
4986
4991
|
this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();
|
|
4992
|
+
/**
|
|
4993
|
+
* The strategy for re-using routes.
|
|
4994
|
+
*/
|
|
4987
4995
|
this.routeReuseStrategy = new DefaultRouteReuseStrategy();
|
|
4988
4996
|
/**
|
|
4989
|
-
*
|
|
4990
|
-
*
|
|
4991
|
-
*
|
|
4992
|
-
* current URL. Default is 'ignore'.
|
|
4997
|
+
* How to handle a navigation request to the current URL. One of:
|
|
4998
|
+
* - `'ignore'` : The router ignores the request.
|
|
4999
|
+
* - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature.
|
|
4993
5000
|
*/
|
|
4994
5001
|
this.onSameUrlNavigation = 'ignore';
|
|
4995
5002
|
/**
|
|
4996
|
-
*
|
|
4997
|
-
* routes.
|
|
5003
|
+
* How to merge parameters, data, and resolved data from parent to child
|
|
5004
|
+
* routes. One of:
|
|
4998
5005
|
*
|
|
4999
|
-
* - `'emptyOnly'
|
|
5000
|
-
*
|
|
5001
|
-
* - `'always'
|
|
5006
|
+
* - `'emptyOnly'` : Inherit parent parameters, data, and resolved data
|
|
5007
|
+
* for path-less or component-less routes.
|
|
5008
|
+
* - `'always'` : Inherit parent parameters, data, and resolved data
|
|
5009
|
+
* for all child routes.
|
|
5002
5010
|
*/
|
|
5003
5011
|
this.paramsInheritanceStrategy = 'emptyOnly';
|
|
5004
5012
|
/**
|
|
@@ -5369,7 +5377,7 @@ class Router {
|
|
|
5369
5377
|
}
|
|
5370
5378
|
}
|
|
5371
5379
|
/**
|
|
5372
|
-
* The current
|
|
5380
|
+
* The current URL.
|
|
5373
5381
|
* @return {?}
|
|
5374
5382
|
*/
|
|
5375
5383
|
get url() { return this.serializeUrl(this.currentUrlTree); }
|
|
@@ -5389,8 +5397,6 @@ class Router {
|
|
|
5389
5397
|
*
|
|
5390
5398
|
* \@usageNotes
|
|
5391
5399
|
*
|
|
5392
|
-
* ### Example
|
|
5393
|
-
*
|
|
5394
5400
|
* ```
|
|
5395
5401
|
* router.resetConfig([
|
|
5396
5402
|
* { path: 'team/:id', component: TeamCmp, children: [
|
|
@@ -5399,7 +5405,8 @@ class Router {
|
|
|
5399
5405
|
* ]}
|
|
5400
5406
|
* ]);
|
|
5401
5407
|
* ```
|
|
5402
|
-
* @param {?} config
|
|
5408
|
+
* @param {?} config The route array for the new configuration.
|
|
5409
|
+
*
|
|
5403
5410
|
* @return {?}
|
|
5404
5411
|
*/
|
|
5405
5412
|
resetConfig(config) {
|
|
@@ -5414,7 +5421,7 @@ class Router {
|
|
|
5414
5421
|
*/
|
|
5415
5422
|
ngOnDestroy() { this.dispose(); }
|
|
5416
5423
|
/**
|
|
5417
|
-
* Disposes of the router
|
|
5424
|
+
* Disposes of the router.
|
|
5418
5425
|
* @return {?}
|
|
5419
5426
|
*/
|
|
5420
5427
|
dispose() {
|
|
@@ -5424,15 +5431,13 @@ class Router {
|
|
|
5424
5431
|
}
|
|
5425
5432
|
}
|
|
5426
5433
|
/**
|
|
5427
|
-
* Applies an array of commands to the current
|
|
5434
|
+
* Applies an array of commands to the current URL tree and creates a new URL tree.
|
|
5428
5435
|
*
|
|
5429
5436
|
* When given an activate route, applies the given commands starting from the route.
|
|
5430
5437
|
* When not given a route, applies the given command starting from the root.
|
|
5431
5438
|
*
|
|
5432
5439
|
* \@usageNotes
|
|
5433
5440
|
*
|
|
5434
|
-
* ### Example
|
|
5435
|
-
*
|
|
5436
5441
|
* ```
|
|
5437
5442
|
* // create /team/33/user/11
|
|
5438
5443
|
* router.createUrlTree(['/team', 33, 'user', 11]);
|
|
@@ -5465,9 +5470,10 @@ class Router {
|
|
|
5465
5470
|
* // navigate to /team/44/user/22
|
|
5466
5471
|
* router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});
|
|
5467
5472
|
* ```
|
|
5468
|
-
* @param {?} commands
|
|
5473
|
+
* @param {?} commands An array of commands to apply.
|
|
5469
5474
|
* @param {?=} navigationExtras
|
|
5470
|
-
* @return {?}
|
|
5475
|
+
* @return {?} The new URL tree.
|
|
5476
|
+
*
|
|
5471
5477
|
*/
|
|
5472
5478
|
createUrlTree(commands, navigationExtras = {}) {
|
|
5473
5479
|
const { relativeTo, queryParams, fragment, preserveQueryParams, queryParamsHandling, preserveFragment } = navigationExtras;
|
|
@@ -5501,12 +5507,7 @@ class Router {
|
|
|
5501
5507
|
return createUrlTree(a, this.currentUrlTree, commands, (/** @type {?} */ (q)), (/** @type {?} */ (f)));
|
|
5502
5508
|
}
|
|
5503
5509
|
/**
|
|
5504
|
-
* Navigate based on the provided
|
|
5505
|
-
*
|
|
5506
|
-
* Returns a promise that:
|
|
5507
|
-
* - resolves to 'true' when navigation succeeds,
|
|
5508
|
-
* - resolves to 'false' when navigation fails,
|
|
5509
|
-
* - is rejected when an error happens.
|
|
5510
|
+
* Navigate based on the provided URL, which must be absolute.
|
|
5510
5511
|
*
|
|
5511
5512
|
* \@usageNotes
|
|
5512
5513
|
*
|
|
@@ -5519,13 +5520,14 @@ class Router {
|
|
|
5519
5520
|
* router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
|
|
5520
5521
|
* ```
|
|
5521
5522
|
*
|
|
5522
|
-
*
|
|
5523
|
-
*
|
|
5524
|
-
*
|
|
5523
|
+
* @param {?} url An absolute URL. The function does not apply any delta to the current URL.
|
|
5524
|
+
* @param {?=} extras An object containing properties that modify the navigation strategy.
|
|
5525
|
+
* The function ignores any properties in the `NavigationExtras` that would change the
|
|
5525
5526
|
* provided URL.
|
|
5526
|
-
*
|
|
5527
|
-
* @
|
|
5528
|
-
*
|
|
5527
|
+
*
|
|
5528
|
+
* @return {?} A Promise that resolves to 'true' when navigation succeeds,
|
|
5529
|
+
* to 'false' when navigation fails, or is rejected on error.
|
|
5530
|
+
*
|
|
5529
5531
|
*/
|
|
5530
5532
|
navigateByUrl(url, extras = { skipLocationChange: false }) {
|
|
5531
5533
|
if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {
|
|
@@ -7277,7 +7279,7 @@ function provideRouterInitializer() {
|
|
|
7277
7279
|
* \@publicApi
|
|
7278
7280
|
* @type {?}
|
|
7279
7281
|
*/
|
|
7280
|
-
const VERSION = new Version('7.2.
|
|
7282
|
+
const VERSION = new Version('7.2.11');
|
|
7281
7283
|
|
|
7282
7284
|
/**
|
|
7283
7285
|
* @fileoverview added by tsickle
|