Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(forms) migrate deprecated jsdoc tags #23186

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/forms/src/directives/abstract_control_directive.ts
Expand Up @@ -19,7 +19,7 @@ import {ValidationErrors} from './validators';
*/
export abstract class AbstractControlDirective {
/**
* The {@link FormControl}, {@link FormGroup}, or {@link FormArray}
* The `FormControl`, `FormGroup`, or `FormArray`
* that backs this directive. Most properties fall through to that
* instance.
*/
Expand Down Expand Up @@ -137,7 +137,7 @@ export abstract class AbstractControlDirective {
* * it is marked as `untouched`
* * value is set to null
*
* For more information, see {@link AbstractControl}.
* For more information, see `AbstractControl`.
*/
reset(value: any = undefined): void {
if (this.control) this.control.reset(value);
Expand Down
Expand Up @@ -18,7 +18,7 @@ import {AsyncValidatorFn, ValidatorFn} from './validators';


/**
* This is a base class for code shared between {@link NgModelGroup} and {@link FormGroupName}.
* This is a base class for code shared between `NgModelGroup` and `FormGroupName`.
*
* @stable
*/
Expand All @@ -44,7 +44,7 @@ export class AbstractFormGroupDirective extends ControlContainer implements OnIn
}

/**
* Get the {@link FormGroup} backing this binding.
* Get the `FormGroup` backing this binding.
*/
get control(): FormGroup { return this.formDirective !.getFormGroup(this); }

Expand All @@ -54,7 +54,7 @@ export class AbstractFormGroupDirective extends ControlContainer implements OnIn
get path(): string[] { return controlPath(this.name, this._parent); }

/**
* Get the {@link Form} to which this group belongs.
* Get the `Form` to which this group belongs.
*/
get formDirective(): Form|null { return this._parent ? this._parent.formDirective : null; }

Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/directives/control_container.ts
Expand Up @@ -11,7 +11,7 @@ import {Form} from './form_interface';


/**
* A directive that contains multiple {@link NgControl}s.
* A directive that contains multiple `NgControl`s.
*
* Only used by the forms module.
*
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/directives/control_value_accessor.ts
Expand Up @@ -110,9 +110,9 @@ export interface ControlValueAccessor {
}

/**
* Used to provide a {@link ControlValueAccessor} for form controls.
* Used to provide a `ControlValueAccessor` for form controls.
*
* See {@link DefaultValueAccessor} for how to implement one.
* See `DefaultValueAccessor` for how to implement one.
* @stable
*/
export const NG_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>('NgValueAccessor');
2 changes: 1 addition & 1 deletion packages/forms/src/directives/default_value_accessor.ts
Expand Up @@ -33,7 +33,7 @@ export const COMPOSITION_BUFFER_MODE = new InjectionToken<boolean>('CompositionE

/**
* The default accessor for writing a value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
* `NgModel`, `FormControlDirective`, and `FormControlName` directives.
*
* ### Example
* ```
Expand Down
6 changes: 3 additions & 3 deletions packages/forms/src/directives/form_interface.ts
Expand Up @@ -14,7 +14,7 @@ import {NgControl} from './ng_control';


/**
* An interface that {@link FormGroupDirective} and {@link NgForm} implement.
* An interface that `FormGroupDirective` and `NgForm` implement.
*
* Only used by the forms module.
*
Expand All @@ -32,7 +32,7 @@ export interface Form {
removeControl(dir: NgControl): void;

/**
* Look up the {@link FormControl} associated with a particular {@link NgControl}.
* Look up the `FormControl` associated with a particular `NgControl`.
*/
getControl(dir: NgControl): FormControl;

Expand All @@ -47,7 +47,7 @@ export interface Form {
removeFormGroup(dir: AbstractFormGroupDirective): void;

/**
* Look up the {@link FormGroup} associated with a particular {@link AbstractFormGroupDirective}.
* Look up the `FormGroup` associated with a particular `AbstractFormGroupDirective`.
*/
getFormGroup(dir: AbstractFormGroupDirective): FormGroup;

Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/directives/ng_control.ts
Expand Up @@ -18,7 +18,7 @@ function unimplemented(): any {

/**
* A base class that all control directive extend.
* It binds a {@link FormControl} object to a DOM element.
* It binds a `FormControl` object to a DOM element.
*
* Used internally by Angular forms.
*
Expand Down
12 changes: 6 additions & 6 deletions packages/forms/src/directives/ng_form.ts
Expand Up @@ -26,22 +26,22 @@ export const formDirectiveProvider: any = {
const resolvedPromise = Promise.resolve(null);

/**
* @whatItDoes Creates a top-level {@link FormGroup} instance and binds it to a form
* to track aggregate form value and validation status.
* @description
*
* @howToUse
* Creates a top-level `FormGroup` instance and binds it to a form
* to track aggregate form value and validation status.
*
* As soon as you import the `FormsModule`, this directive becomes active by default on
* all `<form>` tags. You don't need to add a special selector.
*
* You can export the directive into a local template variable using `ngForm` as the key
* (ex: `#myForm="ngForm"`). This is optional, but useful. Many properties from the underlying
* {@link FormGroup} instance are duplicated on the directive itself, so a reference to it
* `FormGroup` instance are duplicated on the directive itself, so a reference to it
* will give you access to the aggregate value and validity status of the form, as well as
* user interaction properties like `dirty` and `touched`.
*
* To register child controls with the form, you'll want to use {@link NgModel} with a
* `name` attribute. You can also use {@link NgModelGroup} if you'd like to create
* To register child controls with the form, you'll want to use `NgModel` with a
* `name` attribute. You can also use `NgModelGroup` if you'd like to create
* sub-groups within the form.
*
* You can listen to the directive's `ngSubmit` event to be notified when the user has
Expand Down
18 changes: 9 additions & 9 deletions packages/forms/src/directives/ng_model.ts
Expand Up @@ -46,31 +46,31 @@ export const formControlBinding: any = {
const resolvedPromise = Promise.resolve(null);

/**
* @whatItDoes Creates a {@link FormControl} instance from a domain model and binds it
* @description
*
* Creates a `FormControl` instance from a domain model and binds it
* to a form control element.
*
* The {@link FormControl} instance will track the value, user interaction, and
* The `FormControl` instance will track the value, user interaction, and
* validation status of the control and keep the view synced with the model. If used
* within a parent form, the directive will also register itself with the form as a child
* control.
*
* @howToUse
*
* This directive can be used by itself or as part of a larger form. All you need is the
* `ngModel` selector to activate it.
*
* It accepts a domain model as an optional {@link Input}. If you have a one-way binding
* It accepts a domain model as an optional `Input`. If you have a one-way binding
* to `ngModel` with `[]` syntax, changing the value of the domain model in the component
* class will set the value in the view. If you have a two-way binding with `[()]` syntax
* (also known as 'banana-box syntax'), the value in the UI will always be synced back to
* the domain model in your class as well.
*
* If you wish to inspect the properties of the associated {@link FormControl} (like
* If you wish to inspect the properties of the associated `FormControl` (like
* validity state), you can also export the directive into a local template variable using
* `ngModel` as the key (ex: `#myVar="ngModel"`). You can then access the control using the
* directive's `control` property, but most properties you'll need (like `valid` and `dirty`)
* will fall through to the control anyway, so you can access them directly. You can see a
* full list of properties directly available in {@link AbstractControlDirective}.
* full list of properties directly available in `AbstractControlDirective`.
*
* The following is an example of a simple standalone control using `ngModel`:
*
Expand All @@ -94,8 +94,8 @@ const resolvedPromise = Promise.resolve(null);
*
* To see `ngModel` examples with different form control types, see:
*
* * Radio buttons: {@link RadioControlValueAccessor}
* * Selects: {@link SelectControlValueAccessor}
* * Radio buttons: `RadioControlValueAccessor`
* * Selects: `SelectControlValueAccessor`
*
* **npm package**: `@angular/forms`
*
Expand Down
6 changes: 3 additions & 3 deletions packages/forms/src/directives/ng_model_group.ts
Expand Up @@ -21,11 +21,11 @@ export const modelGroupProvider: any = {
};

/**
* @whatItDoes Creates and binds a {@link FormGroup} instance to a DOM element.
* @description
*
* @howToUse
* Creates and binds a `FormGroup` instance to a DOM element.
*
* This directive can only be used as a child of {@link NgForm} (or in other words,
* This directive can only be used as a child of `NgForm` (or in other words,
* within `<form>` tags).
*
* Use this directive if you'd like to create a sub-group within a form. This can
Expand Down
4 changes: 3 additions & 1 deletion packages/forms/src/directives/ng_no_validate_directive.ts
Expand Up @@ -9,7 +9,9 @@
import {Directive} from '@angular/core';

/**
* @whatItDoes Adds `novalidate` attribute to all forms by default.
* @description
*
* Adds `novalidate` attribute to all forms by default.
*
* `novalidate` is used to disable browser's native form validation.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/directives/number_value_accessor.ts
Expand Up @@ -18,7 +18,7 @@ export const NUMBER_VALUE_ACCESSOR: any = {

/**
* The accessor for writing a number value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
* `NgModel`, `FormControlDirective`, and `FormControlName` directives.
*
* ### Example
* ```
Expand Down
10 changes: 5 additions & 5 deletions packages/forms/src/directives/radio_control_value_accessor.ts
Expand Up @@ -55,14 +55,14 @@ export class RadioControlRegistry {
}

/**
* @whatItDoes Writes radio control values and listens to radio control changes.
* @description
*
* Used by {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName}
* to keep the view synced with the {@link FormControl} model.
* Writes radio control values and listens to radio control changes.
*
* @howToUse
* Used by `NgModel`, `FormControlDirective`, and `FormControlName`
* to keep the view synced with the `FormControl` model.
*
* If you have imported the {@link FormsModule} or the {@link ReactiveFormsModule}, this
* If you have imported the `FormsModule` or the `ReactiveFormsModule`, this
* value accessor will be active on any radio control that has a form directive. You do
* **not** need to add a special selector to activate it.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/src/directives/range_value_accessor.ts
Expand Up @@ -18,7 +18,7 @@ export const RANGE_VALUE_ACCESSOR: StaticProvider = {

/**
* The accessor for writing a range value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
* `NgModel`, `FormControlDirective`, and `FormControlName` directives.
*
* ### Example
* ```
Expand Down
Expand Up @@ -29,29 +29,29 @@ export const formControlBinding: any = {
};

/**
* @whatItDoes Syncs a standalone {@link FormControl} instance to a form control element.
* @description
*
* In other words, this directive ensures that any values written to the {@link FormControl}
* Syncs a standalone `FormControl` instance to a form control element.
*
* This directive ensures that any values written to the `FormControl`
* instance programmatically will be written to the DOM element (model -> view). Conversely,
* any values written to the DOM element through user input will be reflected in the
* {@link FormControl} instance (view -> model).
*
* @howToUse
* `FormControl` instance (view -> model).
*
* Use this directive if you'd like to create and manage a {@link FormControl} instance directly.
* Simply create a {@link FormControl}, save it to your component class, and pass it into the
* {@link FormControlDirective}.
* Use this directive if you'd like to create and manage a `FormControl` instance directly.
* Simply create a `FormControl`, save it to your component class, and pass it into the
* `FormControlDirective`.
*
* This directive is designed to be used as a standalone control. Unlike {@link FormControlName},
* it does not require that your {@link FormControl} instance be part of any parent
* {@link FormGroup}, and it won't be registered to any {@link FormGroupDirective} that
* This directive is designed to be used as a standalone control. Unlike `FormControlName`,
* it does not require that your `FormControl` instance be part of any parent
* `FormGroup`, and it won't be registered to any `FormGroupDirective` that
* exists above it.
*
* **Get the value**: the `value` property is always synced and available on the
* {@link FormControl} instance. See a full list of available properties in
* {@link AbstractControl}.
* `FormControl` instance. See a full list of available properties in
* `AbstractControl`.
*
* **Set the value**: You can pass in an initial value when instantiating the {@link FormControl},
* **Set the value**: You can pass in an initial value when instantiating the `FormControl`,
* or you can set it programmatically later using {@link AbstractControl#setValue setValue} or
* {@link AbstractControl#patchValue patchValue}.
*
Expand Down
Expand Up @@ -28,32 +28,32 @@ export const controlNameBinding: any = {
};

/**
* @whatItDoes Syncs a {@link FormControl} in an existing {@link FormGroup} to a form control
* @description
*
* Syncs a `FormControl` in an existing `FormGroup` to a form control
* element by name.
*
* In other words, this directive ensures that any values written to the {@link FormControl}
* This directive ensures that any values written to the `FormControl`
* instance programmatically will be written to the DOM element (model -> view). Conversely,
* any values written to the DOM element through user input will be reflected in the
* {@link FormControl} instance (view -> model).
*
* @howToUse
* `FormControl` instance (view -> model).
*
* This directive is designed to be used with a parent {@link FormGroupDirective} (selector:
* This directive is designed to be used with a parent `FormGroupDirective` (selector:
* `[formGroup]`).
*
* It accepts the string name of the {@link FormControl} instance you want to
* link, and will look for a {@link FormControl} registered with that name in the
* closest {@link FormGroup} or {@link FormArray} above it.
* It accepts the string name of the `FormControl` instance you want to
* link, and will look for a `FormControl` registered with that name in the
* closest `FormGroup` or `FormArray` above it.
*
* **Access the control**: You can access the {@link FormControl} associated with
* **Access the control**: You can access the `FormControl` associated with
* this directive by using the {@link AbstractControl#get get} method.
* Ex: `this.form.get('first');`
*
* **Get value**: the `value` property is always synced and available on the {@link FormControl}.
* See a full list of available properties in {@link AbstractControl}.
* **Get value**: the `value` property is always synced and available on the `FormControl`.
* See a full list of available properties in `AbstractControl`.
*
* **Set value**: You can set an initial value for the control when instantiating the
* {@link FormControl}, or you can set it programmatically later using
* `FormControl`, or you can set it programmatically later using
* {@link AbstractControl#setValue setValue} or {@link AbstractControl#patchValue patchValue}.
*
* **Listen to value**: If you want to listen to changes in the value of the control, you can
Expand All @@ -69,12 +69,12 @@ export const controlNameBinding: any = {
*
* To see `formControlName` examples with different form control types, see:
*
* * Radio buttons: {@link RadioControlValueAccessor}
* * Selects: {@link SelectControlValueAccessor}
* * Radio buttons: `RadioControlValueAccessor`
* * Selects: `SelectControlValueAccessor`
*
* **npm package**: `@angular/forms`
*
* **NgModule**: {@link ReactiveFormsModule}
* **NgModule**: `ReactiveFormsModule`
*
* ### Use with ngModel
*
Expand Down
Expand Up @@ -23,22 +23,22 @@ export const formDirectiveProvider: any = {
};

/**
* @whatItDoes Binds an existing {@link FormGroup} to a DOM element.
* @description
*
* @howToUse
* Binds an existing `FormGroup` to a DOM element.
*
* This directive accepts an existing {@link FormGroup} instance. It will then use this
* {@link FormGroup} instance to match any child {@link FormControl}, {@link FormGroup},
* and {@link FormArray} instances to child {@link FormControlName}, {@link FormGroupName},
* and {@link FormArrayName} directives.
* This directive accepts an existing `FormGroup` instance. It will then use this
* `FormGroup` instance to match any child `FormControl`, `FormGroup`,
* and `FormArray` instances to child `FormControlName`, `FormGroupName`,
* and `FormArrayName` directives.
*
* **Set value**: You can set the form's initial value when instantiating the
* {@link FormGroup}, or you can set it programmatically later using the {@link FormGroup}'s
* `FormGroup`, or you can set it programmatically later using the `FormGroup`'s
* {@link AbstractControl#setValue setValue} or {@link AbstractControl#patchValue patchValue}
* methods.
*
* **Listen to value**: If you want to listen to changes in the value of the form, you can subscribe
* to the {@link FormGroup}'s {@link AbstractControl#valueChanges valueChanges} event. You can also
* to the `FormGroup`'s {@link AbstractControl#valueChanges valueChanges} event. You can also
* listen to its {@link AbstractControl#statusChanges statusChanges} event to be notified when the
* validation status is re-calculated.
*
Expand All @@ -54,7 +54,7 @@ export const formDirectiveProvider: any = {
*
* **npm package**: `@angular/forms`
*
* **NgModule**: {@link ReactiveFormsModule}
* **NgModule**: `ReactiveFormsModule`
*
* @stable
*/
Expand Down