doc: standardize deprecation of preserveQueryParams (4.0 only) (#14236)

PR closes #14236
This commit is contained in:
Miško Hevery 2017-02-01 15:48:09 -08:00 committed by Miško Hevery
parent a7479f657a
commit 69a4bb0bcd
2 changed files with 6 additions and 4 deletions

View File

@ -58,9 +58,8 @@ import {UrlTree} from '../url_tree';
* ``` * ```
* RouterLink will use these to generate this link: `/user/bob#education?debug=true`. * 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 in v4.0.0 use `queryParamsHandling` instead) You can also tell the
* * directive to preserve the current query params and fragment:
* deprecated, use `queryParamsHandling` instead
* *
* ``` * ```
* <a [routerLink]="['/user/bob']" preserveQueryParams preserveFragment> * <a [routerLink]="['/user/bob']" preserveQueryParams preserveFragment>
@ -121,6 +120,9 @@ export class RouterLink {
} }
} }
/**
* @deprecated 4.0.0 use `queryParamsHandling` instead.
*/
@Input() @Input()
set preserveQueryParams(value: boolean) { set preserveQueryParams(value: boolean) {
if (isDevMode() && <any>console && <any>console.warn) { if (isDevMode() && <any>console && <any>console.warn) {

View File

@ -242,7 +242,7 @@ export declare abstract class RouteReuseStrategy {
export declare class RouterLink { export declare class RouterLink {
fragment: string; fragment: string;
preserveFragment: boolean; preserveFragment: boolean;
preserveQueryParams: boolean; /** @deprecated */ preserveQueryParams: boolean;
queryParams: { queryParams: {
[k: string]: any; [k: string]: any;
}; };