@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/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.11
|
|
3
3
|
* (c) 2010-2019 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -3680,9 +3680,10 @@ function defaultRouterHook(snapshot, runExtras) {
|
|
|
3680
3680
|
/**
|
|
3681
3681
|
* @description
|
|
3682
3682
|
*
|
|
3683
|
-
*
|
|
3683
|
+
* An NgModule that provides navigation and URL manipulation capabilities.
|
|
3684
3684
|
*
|
|
3685
|
-
*
|
|
3685
|
+
* @see `Route`.
|
|
3686
|
+
* @see [Routing and Navigation Guide](guide/router).
|
|
3686
3687
|
*
|
|
3687
3688
|
* @ngModule RouterModule
|
|
3688
3689
|
*
|
|
@@ -3704,11 +3705,12 @@ var Router = /** @class */ (function () {
|
|
|
3704
3705
|
this.currentNavigation = null;
|
|
3705
3706
|
this.navigationId = 0;
|
|
3706
3707
|
this.isNgZoneEnabled = false;
|
|
3708
|
+
/**
|
|
3709
|
+
* An event stream for routing events in this NgModule.
|
|
3710
|
+
*/
|
|
3707
3711
|
this.events = new Subject();
|
|
3708
3712
|
/**
|
|
3709
|
-
*
|
|
3710
|
-
*
|
|
3711
|
-
* See `ErrorHandler` for more information.
|
|
3713
|
+
* A handler for navigation errors in this NgModule.
|
|
3712
3714
|
*/
|
|
3713
3715
|
this.errorHandler = defaultErrorHandler;
|
|
3714
3716
|
/**
|
|
@@ -3718,13 +3720,16 @@ var Router = /** @class */ (function () {
|
|
|
3718
3720
|
*/
|
|
3719
3721
|
this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;
|
|
3720
3722
|
/**
|
|
3721
|
-
*
|
|
3723
|
+
* True if at least one navigation event has occurred,
|
|
3724
|
+
* false otherwise.
|
|
3722
3725
|
*/
|
|
3723
3726
|
this.navigated = false;
|
|
3724
3727
|
this.lastSuccessfulId = -1;
|
|
3725
3728
|
/**
|
|
3726
|
-
*
|
|
3727
|
-
*
|
|
3729
|
+
* Hooks that enable you to pause navigation,
|
|
3730
|
+
* either before or after the preactivation phase.
|
|
3731
|
+
* Used by `RouterModule`.
|
|
3732
|
+
*
|
|
3728
3733
|
* @internal
|
|
3729
3734
|
*/
|
|
3730
3735
|
this.hooks = {
|
|
@@ -3735,21 +3740,24 @@ var Router = /** @class */ (function () {
|
|
|
3735
3740
|
* Extracts and merges URLs. Used for AngularJS to Angular migrations.
|
|
3736
3741
|
*/
|
|
3737
3742
|
this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();
|
|
3743
|
+
/**
|
|
3744
|
+
* The strategy for re-using routes.
|
|
3745
|
+
*/
|
|
3738
3746
|
this.routeReuseStrategy = new DefaultRouteReuseStrategy();
|
|
3739
3747
|
/**
|
|
3740
|
-
*
|
|
3741
|
-
*
|
|
3742
|
-
*
|
|
3743
|
-
* current URL. Default is 'ignore'.
|
|
3748
|
+
* How to handle a navigation request to the current URL. One of:
|
|
3749
|
+
* - `'ignore'` : The router ignores the request.
|
|
3750
|
+
* - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature.
|
|
3744
3751
|
*/
|
|
3745
3752
|
this.onSameUrlNavigation = 'ignore';
|
|
3746
3753
|
/**
|
|
3747
|
-
*
|
|
3748
|
-
* routes.
|
|
3754
|
+
* How to merge parameters, data, and resolved data from parent to child
|
|
3755
|
+
* routes. One of:
|
|
3749
3756
|
*
|
|
3750
|
-
* - `'emptyOnly'
|
|
3751
|
-
*
|
|
3752
|
-
* - `'always'
|
|
3757
|
+
* - `'emptyOnly'` : Inherit parent parameters, data, and resolved data
|
|
3758
|
+
* for path-less or component-less routes.
|
|
3759
|
+
* - `'always'` : Inherit parent parameters, data, and resolved data
|
|
3760
|
+
* for all child routes.
|
|
3753
3761
|
*/
|
|
3754
3762
|
this.paramsInheritanceStrategy = 'emptyOnly';
|
|
3755
3763
|
/**
|
|
@@ -4071,7 +4079,7 @@ var Router = /** @class */ (function () {
|
|
|
4071
4079
|
}
|
|
4072
4080
|
};
|
|
4073
4081
|
Object.defineProperty(Router.prototype, "url", {
|
|
4074
|
-
/** The current
|
|
4082
|
+
/** The current URL. */
|
|
4075
4083
|
get: function () { return this.serializeUrl(this.currentUrlTree); },
|
|
4076
4084
|
enumerable: true,
|
|
4077
4085
|
configurable: true
|
|
@@ -4083,9 +4091,9 @@ var Router = /** @class */ (function () {
|
|
|
4083
4091
|
/**
|
|
4084
4092
|
* Resets the configuration used for navigation and generating links.
|
|
4085
4093
|
*
|
|
4086
|
-
* @
|
|
4094
|
+
* @param config The route array for the new configuration.
|
|
4087
4095
|
*
|
|
4088
|
-
*
|
|
4096
|
+
* @usageNotes
|
|
4089
4097
|
*
|
|
4090
4098
|
* ```
|
|
4091
4099
|
* router.resetConfig([
|
|
@@ -4104,7 +4112,7 @@ var Router = /** @class */ (function () {
|
|
|
4104
4112
|
};
|
|
4105
4113
|
/** @docsNotRequired */
|
|
4106
4114
|
Router.prototype.ngOnDestroy = function () { this.dispose(); };
|
|
4107
|
-
/** Disposes of the router */
|
|
4115
|
+
/** Disposes of the router. */
|
|
4108
4116
|
Router.prototype.dispose = function () {
|
|
4109
4117
|
if (this.locationSubscription) {
|
|
4110
4118
|
this.locationSubscription.unsubscribe();
|
|
@@ -4112,14 +4120,16 @@ var Router = /** @class */ (function () {
|
|
|
4112
4120
|
}
|
|
4113
4121
|
};
|
|
4114
4122
|
/**
|
|
4115
|
-
* Applies an array of commands to the current
|
|
4123
|
+
* Applies an array of commands to the current URL tree and creates a new URL tree.
|
|
4116
4124
|
*
|
|
4117
4125
|
* When given an activate route, applies the given commands starting from the route.
|
|
4118
4126
|
* When not given a route, applies the given command starting from the root.
|
|
4119
4127
|
*
|
|
4120
|
-
* @
|
|
4128
|
+
* @param commands An array of commands to apply.
|
|
4129
|
+
* @param navigationExtras
|
|
4130
|
+
* @returns The new URL tree.
|
|
4121
4131
|
*
|
|
4122
|
-
*
|
|
4132
|
+
* @usageNotes
|
|
4123
4133
|
*
|
|
4124
4134
|
* ```
|
|
4125
4135
|
* // create /team/33/user/11
|
|
@@ -4184,12 +4194,15 @@ var Router = /** @class */ (function () {
|
|
|
4184
4194
|
return createUrlTree(a, this.currentUrlTree, commands, q, f);
|
|
4185
4195
|
};
|
|
4186
4196
|
/**
|
|
4187
|
-
* Navigate based on the provided
|
|
4197
|
+
* Navigate based on the provided URL, which must be absolute.
|
|
4188
4198
|
*
|
|
4189
|
-
*
|
|
4190
|
-
*
|
|
4191
|
-
*
|
|
4192
|
-
*
|
|
4199
|
+
* @param url An absolute URL. The function does not apply any delta to the current URL.
|
|
4200
|
+
* @param extras An object containing properties that modify the navigation strategy.
|
|
4201
|
+
* The function ignores any properties in the `NavigationExtras` that would change the
|
|
4202
|
+
* provided URL.
|
|
4203
|
+
*
|
|
4204
|
+
* @returns A Promise that resolves to 'true' when navigation succeeds,
|
|
4205
|
+
* to 'false' when navigation fails, or is rejected on error.
|
|
4193
4206
|
*
|
|
4194
4207
|
* @usageNotes
|
|
4195
4208
|
*
|
|
@@ -4202,10 +4215,6 @@ var Router = /** @class */ (function () {
|
|
|
4202
4215
|
* router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
|
|
4203
4216
|
* ```
|
|
4204
4217
|
*
|
|
4205
|
-
* Since `navigateByUrl()` takes an absolute URL as the first parameter,
|
|
4206
|
-
* it will not apply any delta to the current URL and ignores any properties
|
|
4207
|
-
* in the second parameter (the `NavigationExtras`) that would change the
|
|
4208
|
-
* provided URL.
|
|
4209
4218
|
*/
|
|
4210
4219
|
Router.prototype.navigateByUrl = function (url, extras) {
|
|
4211
4220
|
if (extras === void 0) { extras = { skipLocationChange: false }; }
|
|
@@ -5717,7 +5726,7 @@ function provideRouterInitializer() {
|
|
|
5717
5726
|
/**
|
|
5718
5727
|
* @publicApi
|
|
5719
5728
|
*/
|
|
5720
|
-
var VERSION = new Version('7.2.
|
|
5729
|
+
var VERSION = new Version('7.2.11');
|
|
5721
5730
|
|
|
5722
5731
|
/**
|
|
5723
5732
|
* @license
|