From 69a4bb0bcd675e32a9b34a393eb335e146818f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mis=CC=8Cko=20Hevery?= Date: Wed, 1 Feb 2017 15:48:09 -0800 Subject: [PATCH] doc: standardize deprecation of `preserveQueryParams` (4.0 only) (#14236) PR closes #14236 --- modules/@angular/router/src/directives/router_link.ts | 8 +++++--- tools/public_api_guard/router/index.d.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/@angular/router/src/directives/router_link.ts b/modules/@angular/router/src/directives/router_link.ts index 5a84060bd5..cd7f56724b 100644 --- a/modules/@angular/router/src/directives/router_link.ts +++ b/modules/@angular/router/src/directives/router_link.ts @@ -58,9 +58,8 @@ import {UrlTree} from '../url_tree'; * ``` * RouterLink will use these to generate this link: `/user/bob#education?debug=true`. * - * You can also tell the directive to preserve the current query params and fragment: - * - * deprecated, use `queryParamsHandling` instead + * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the + * directive to preserve the current query params and fragment: * * ``` * @@ -121,6 +120,9 @@ export class RouterLink { } } + /** + * @deprecated 4.0.0 use `queryParamsHandling` instead. + */ @Input() set preserveQueryParams(value: boolean) { if (isDevMode() && console && console.warn) { diff --git a/tools/public_api_guard/router/index.d.ts b/tools/public_api_guard/router/index.d.ts index d1532d5484..99edbb559e 100644 --- a/tools/public_api_guard/router/index.d.ts +++ b/tools/public_api_guard/router/index.d.ts @@ -242,7 +242,7 @@ export declare abstract class RouteReuseStrategy { export declare class RouterLink { fragment: string; preserveFragment: boolean; - preserveQueryParams: boolean; + /** @deprecated */ preserveQueryParams: boolean; queryParams: { [k: string]: any; };