From f2ba55f2fb9b1f139507d4ba4d9ae2b51bae02cf Mon Sep 17 00:00:00 2001 From: vincecampanale Date: Sun, 28 Jan 2018 11:27:20 -0500 Subject: [PATCH] docs(router): change description of parameter usage for navigation functions (#21840) PR Close #21840 --- packages/router/src/router.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/router/src/router.ts b/packages/router/src/router.ts index f1f7c69a55..dfe8e95eae 100644 --- a/packages/router/src/router.ts +++ b/packages/router/src/router.ts @@ -495,8 +495,10 @@ export class Router { * router.navigateByUrl("/team/33/user/11", { skipLocationChange: true }); * ``` * - * In opposite to `navigate`, `navigateByUrl` takes a whole URL - * and does not apply any delta to the current one. + * Since `navigateByUrl()` takes an absolute URL as the first parameter, + * it will not apply any delta to the current URL and ignores any properties + * in the second parameter (the `NavigationExtras`) that would change the + * provided URL. */ navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}): Promise { @@ -529,8 +531,9 @@ export class Router { * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true}); * ``` * - * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current - * URL. + * The first parameter of `navigate()` is a delta to be applied to the current URL + * or the one provided in the `relativeTo` property of the second parameter (the + * `NavigationExtras`). */ navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}): Promise {