@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/src/router.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { Checks } from './utils/preactivation';
|
|
|
20
20
|
/**
|
|
21
21
|
* @description
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* Options that modify the navigation strategy.
|
|
24
24
|
*
|
|
25
25
|
* @publicApi
|
|
26
26
|
*/
|
|
@@ -77,9 +77,8 @@ export interface NavigationExtras {
|
|
|
77
77
|
*/
|
|
78
78
|
fragment?: string;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* deprecated, use `queryParamsHandling` instead
|
|
80
|
+
* DEPRECATED: Use `queryParamsHandling` instead to preserve
|
|
81
|
+
* query parameters for the next navigation.
|
|
83
82
|
*
|
|
84
83
|
* ```
|
|
85
84
|
* // Preserve query params from /results?page=1 to /view?page=1
|
|
@@ -90,7 +89,7 @@ export interface NavigationExtras {
|
|
|
90
89
|
*/
|
|
91
90
|
preserveQueryParams?: boolean;
|
|
92
91
|
/**
|
|
93
|
-
*
|
|
92
|
+
* Configuration strategy for how to handle query parameters for the next navigation.
|
|
94
93
|
*
|
|
95
94
|
* ```
|
|
96
95
|
* // from /results?page=1 to /view?page=1&page=2
|
|
@@ -225,9 +224,10 @@ export declare type NavigationTransition = {
|
|
|
225
224
|
/**
|
|
226
225
|
* @description
|
|
227
226
|
*
|
|
228
|
-
*
|
|
227
|
+
* An NgModule that provides navigation and URL manipulation capabilities.
|
|
229
228
|
*
|
|
230
|
-
*
|
|
229
|
+
* @see `Route`.
|
|
230
|
+
* @see [Routing and Navigation Guide](guide/router).
|
|
231
231
|
*
|
|
232
232
|
* @ngModule RouterModule
|
|
233
233
|
*
|
|
@@ -252,12 +252,16 @@ export declare class Router {
|
|
|
252
252
|
private ngModule;
|
|
253
253
|
private console;
|
|
254
254
|
private isNgZoneEnabled;
|
|
255
|
+
/**
|
|
256
|
+
* An event stream for routing events in this NgModule.
|
|
257
|
+
*/
|
|
255
258
|
readonly events: Observable<Event>;
|
|
259
|
+
/**
|
|
260
|
+
* The current state of routing in this NgModule.
|
|
261
|
+
*/
|
|
256
262
|
readonly routerState: RouterState;
|
|
257
263
|
/**
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
* See `ErrorHandler` for more information.
|
|
264
|
+
* A handler for navigation errors in this NgModule.
|
|
261
265
|
*/
|
|
262
266
|
errorHandler: ErrorHandler;
|
|
263
267
|
/**
|
|
@@ -267,7 +271,8 @@ export declare class Router {
|
|
|
267
271
|
*/
|
|
268
272
|
malformedUriErrorHandler: (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;
|
|
269
273
|
/**
|
|
270
|
-
*
|
|
274
|
+
* True if at least one navigation event has occurred,
|
|
275
|
+
* false otherwise.
|
|
271
276
|
*/
|
|
272
277
|
navigated: boolean;
|
|
273
278
|
private lastSuccessfulId;
|
|
@@ -275,21 +280,24 @@ export declare class Router {
|
|
|
275
280
|
* Extracts and merges URLs. Used for AngularJS to Angular migrations.
|
|
276
281
|
*/
|
|
277
282
|
urlHandlingStrategy: UrlHandlingStrategy;
|
|
283
|
+
/**
|
|
284
|
+
* The strategy for re-using routes.
|
|
285
|
+
*/
|
|
278
286
|
routeReuseStrategy: RouteReuseStrategy;
|
|
279
287
|
/**
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
* current URL. Default is 'ignore'.
|
|
288
|
+
* How to handle a navigation request to the current URL. One of:
|
|
289
|
+
* - `'ignore'` : The router ignores the request.
|
|
290
|
+
* - `'reload'` : The router reloads the URL. Use to implement a "refresh" feature.
|
|
284
291
|
*/
|
|
285
292
|
onSameUrlNavigation: 'reload' | 'ignore';
|
|
286
293
|
/**
|
|
287
|
-
*
|
|
288
|
-
* routes.
|
|
294
|
+
* How to merge parameters, data, and resolved data from parent to child
|
|
295
|
+
* routes. One of:
|
|
289
296
|
*
|
|
290
|
-
* - `'emptyOnly'
|
|
291
|
-
*
|
|
292
|
-
* - `'always'
|
|
297
|
+
* - `'emptyOnly'` : Inherit parent parameters, data, and resolved data
|
|
298
|
+
* for path-less or component-less routes.
|
|
299
|
+
* - `'always'` : Inherit parent parameters, data, and resolved data
|
|
300
|
+
* for all child routes.
|
|
293
301
|
*/
|
|
294
302
|
paramsInheritanceStrategy: 'emptyOnly' | 'always';
|
|
295
303
|
/**
|
|
@@ -322,16 +330,16 @@ export declare class Router {
|
|
|
322
330
|
* Sets up the location change listener.
|
|
323
331
|
*/
|
|
324
332
|
setUpLocationChangeListener(): void;
|
|
325
|
-
/** The current
|
|
333
|
+
/** The current URL. */
|
|
326
334
|
readonly url: string;
|
|
327
335
|
/** The current Navigation object if one exists */
|
|
328
336
|
getCurrentNavigation(): Navigation | null;
|
|
329
337
|
/**
|
|
330
338
|
* Resets the configuration used for navigation and generating links.
|
|
331
339
|
*
|
|
332
|
-
* @
|
|
340
|
+
* @param config The route array for the new configuration.
|
|
333
341
|
*
|
|
334
|
-
*
|
|
342
|
+
* @usageNotes
|
|
335
343
|
*
|
|
336
344
|
* ```
|
|
337
345
|
* router.resetConfig([
|
|
@@ -345,17 +353,19 @@ export declare class Router {
|
|
|
345
353
|
resetConfig(config: Routes): void;
|
|
346
354
|
/** @docsNotRequired */
|
|
347
355
|
ngOnDestroy(): void;
|
|
348
|
-
/** Disposes of the router */
|
|
356
|
+
/** Disposes of the router. */
|
|
349
357
|
dispose(): void;
|
|
350
358
|
/**
|
|
351
|
-
* Applies an array of commands to the current
|
|
359
|
+
* Applies an array of commands to the current URL tree and creates a new URL tree.
|
|
352
360
|
*
|
|
353
361
|
* When given an activate route, applies the given commands starting from the route.
|
|
354
362
|
* When not given a route, applies the given command starting from the root.
|
|
355
363
|
*
|
|
356
|
-
* @
|
|
364
|
+
* @param commands An array of commands to apply.
|
|
365
|
+
* @param navigationExtras
|
|
366
|
+
* @returns The new URL tree.
|
|
357
367
|
*
|
|
358
|
-
*
|
|
368
|
+
* @usageNotes
|
|
359
369
|
*
|
|
360
370
|
* ```
|
|
361
371
|
* // create /team/33/user/11
|
|
@@ -392,12 +402,15 @@ export declare class Router {
|
|
|
392
402
|
*/
|
|
393
403
|
createUrlTree(commands: any[], navigationExtras?: NavigationExtras): UrlTree;
|
|
394
404
|
/**
|
|
395
|
-
* Navigate based on the provided
|
|
405
|
+
* Navigate based on the provided URL, which must be absolute.
|
|
396
406
|
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
399
|
-
*
|
|
400
|
-
*
|
|
407
|
+
* @param url An absolute URL. The function does not apply any delta to the current URL.
|
|
408
|
+
* @param extras An object containing properties that modify the navigation strategy.
|
|
409
|
+
* The function ignores any properties in the `NavigationExtras` that would change the
|
|
410
|
+
* provided URL.
|
|
411
|
+
*
|
|
412
|
+
* @returns A Promise that resolves to 'true' when navigation succeeds,
|
|
413
|
+
* to 'false' when navigation fails, or is rejected on error.
|
|
401
414
|
*
|
|
402
415
|
* @usageNotes
|
|
403
416
|
*
|
|
@@ -410,10 +423,6 @@ export declare class Router {
|
|
|
410
423
|
* router.navigateByUrl("/team/33/user/11", { skipLocationChange: true });
|
|
411
424
|
* ```
|
|
412
425
|
*
|
|
413
|
-
* Since `navigateByUrl()` takes an absolute URL as the first parameter,
|
|
414
|
-
* it will not apply any delta to the current URL and ignores any properties
|
|
415
|
-
* in the second parameter (the `NavigationExtras`) that would change the
|
|
416
|
-
* provided URL.
|
|
417
426
|
*/
|
|
418
427
|
navigateByUrl(url: string | UrlTree, extras?: NavigationExtras): Promise<boolean>;
|
|
419
428
|
/**
|
package/testing.d.ts
CHANGED
package/upgrade.d.ts
CHANGED