Skip to content

Commit

Permalink
docs(forms): Make links out of @see tags (#50110)
Browse files Browse the repository at this point in the history
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
  • Loading branch information
JeanMeche authored and pkozlowski-opensource committed Jun 14, 2023
1 parent a584169 commit 7eb5286
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion packages/forms/src/directives/ng_control_status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class NgControlStatus extends AbstractControlStatus {
* based on control status (valid/invalid/dirty/etc). On groups, this includes the additional
* class ng-submitted.
*
* @see `NgControlStatus`
* @see {@link NgControlStatus}
*
* @ngModule ReactiveFormsModule
* @ngModule FormsModule
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/directives/ng_model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const resolvedPromise = (() => Promise.resolve())();
* for direct access. See a full list of properties directly available in
* `AbstractControlDirective`.
*
* @see `RadioControlValueAccessor`
* @see `SelectControlValueAccessor`
* @see {@link RadioControlValueAccessor}
* @see {@link SelectControlValueAccessor}
*
* @usageNotes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const formControlBinding: Provider = {
* For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).
*
* @see [Reactive Forms Guide](guide/reactive-forms)
* @see `FormControl`
* @see `AbstractControl`
* @see {@link FormControl}
* @see {@link AbstractControl}
*
* @usageNotes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const controlNameBinding: Provider = {
* element by name.
*
* @see [Reactive Forms Guide](guide/reactive-forms)
* @see `FormControl`
* @see `AbstractControl`
* @see {@link FormControl}
* @see {@link AbstractControl}
*
* @usageNotes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const formDirectiveProvider: Provider = {
* and `FormArrayName` directives.
*
* @see [Reactive Forms Guide](guide/reactive-forms)
* @see `AbstractControl`
* @see {@link AbstractControl}
*
* @usageNotes
* ### Register Form Group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const formArrayNameProvider: any = {
* `FormGroup` instance you passed into `FormGroupDirective`.
*
* @see [Reactive Forms Guide](guide/reactive-forms)
* @see `AbstractControl`
* @see {@link AbstractControl}
*
* @usageNotes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class SelectControlValueAccessor extends BuiltInControlValueAccessor impl
* @description
* Marks `<option>` as dynamic, so Angular can be notified when options change.
*
* @see `SelectControlValueAccessor`
* @see {@link SelectControlValueAccessor}
*
* @ngModule ReactiveFormsModule
* @ngModule FormsModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ abstract class HTMLCollection {
* control changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and
* `NgModel` directives.
*
* @see `SelectControlValueAccessor`
* @see {@link SelectControlValueAccessor}
*
* @usageNotes
*
Expand Down Expand Up @@ -196,7 +196,7 @@ export class SelectMultipleControlValueAccessor extends BuiltInControlValueAcces
* @description
* Marks `<option>` as dynamic, so Angular can be notified when options change.
*
* @see `SelectMultipleControlValueAccessor`
* @see {@link SelectMultipleControlValueAccessor}
*
* @ngModule ReactiveFormsModule
* @ngModule FormsModule
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/directives/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {AsyncValidatorFn, Validator, ValidatorFn} from './validators';
* Token to provide to allow SetDisabledState to always be called when a CVA is added, regardless of
* whether the control is disabled or enabled.
*
* @see `FormsModule.withConfig`
* @see {@link FormsModule#withconfig}
*/
export const CALL_SET_DISABLED_STATE = new InjectionToken(
'CallSetDisabledState', {providedIn: 'root', factory: () => setDisabledStateDefault});
Expand All @@ -40,7 +40,7 @@ export const CALL_SET_DISABLED_STATE = new InjectionToken(
* called when disabled, which is the legacy behavior for compatibility.
*
* @publicApi
* @see `FormsModule.withConfig`
* @see {@link FormsModule#withconfig}
*/
export type SetDisabledStateOption = 'whenDisabledForLegacyCode'|'always';

Expand Down
42 changes: 21 additions & 21 deletions packages/forms/src/model/abstract_model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,32 @@ import {addValidators, composeAsyncValidators, composeValidators, hasValidator,
/**
* Reports that a control is valid, meaning that no errors exist in the input value.
*
* @see `status`
* @see {@link status}
*/
export const VALID = 'VALID';

/**
* Reports that a control is invalid, meaning that an error exists in the input value.
*
* @see `status`
* @see {@link status}
*/
export const INVALID = 'INVALID';

/**
* Reports that a control is pending, meaning that that async validation is occurring and
* errors are not yet available for the input value.
*
* @see `markAsPending`
* @see `status`
* @see {@link markAsPending}
* @see {@link status}
*/
export const PENDING = 'PENDING';

/**
* Reports that a control is disabled, meaning that the control is exempt from ancestor
* calculations of validity or value.
*
* @see `markAsDisabled`
* @see `status`
* @see {@link markAsDisabled}
* @see {@link status}
*/
export const DISABLED = 'DISABLED';

Expand Down Expand Up @@ -467,7 +467,7 @@ export abstract class AbstractControl<TValue = any, TRawValue extends TValue = T
/**
* The validation status of the control.
*
* @see `FormControlStatus`
* @see {@link FormControlStatus}
*
* These status values are mutually exclusive, so a control cannot be
* both valid AND invalid or invalid AND disabled.
Expand Down Expand Up @@ -599,7 +599,7 @@ export abstract class AbstractControl<TValue = any, TRawValue extends TValue = T
* A multicasting observable that emits an event every time the validation `status` of the control
* recalculates.
*
* @see `FormControlStatus`
* @see {@link FormControlStatus}
* @see {@link AbstractControl.status}
*
*/
Expand Down Expand Up @@ -787,9 +787,9 @@ export abstract class AbstractControl<TValue = any, TRawValue extends TValue = T
* Marks the control as `touched`. A control is touched by focus and
* blur events that do not change the value.
*
* @see `markAsUntouched()`
* @see `markAsDirty()`
* @see `markAsPristine()`
* @see {@link markAsUntouched()}
* @see {@link markAsDirty()}
* @see {@link markAsPristine()}
*
* @param opts Configuration options that determine how the control propagates changes
* and emits events after marking is applied.
Expand All @@ -806,7 +806,7 @@ export abstract class AbstractControl<TValue = any, TRawValue extends TValue = T

/**
* Marks the control and all its descendant controls as `touched`.
* @see `markAsTouched()`
* @see {@link markAsTouched()}
*/
markAllAsTouched(): void {
this.markAsTouched({onlySelf: true});
Expand All @@ -820,9 +820,9 @@ export abstract class AbstractControl<TValue = any, TRawValue extends TValue = T
* If the control has any children, also marks all children as `untouched`
* and recalculates the `touched` status of all parent controls.
*
* @see `markAsTouched()`
* @see `markAsDirty()`
* @see `markAsPristine()`
* @see {@link markAsTouched()}
* @see {@link markAsDirty()}
* @see {@link markAsPristine()}
*
* @param opts Configuration options that determine how the control propagates changes
* and emits events after the marking is applied.
Expand All @@ -846,9 +846,9 @@ export abstract class AbstractControl<TValue = any, TRawValue extends TValue = T
* Marks the control as `dirty`. A control becomes dirty when
* the control's value is changed through the UI; compare `markAsTouched`.
*
* @see `markAsTouched()`
* @see `markAsUntouched()`
* @see `markAsPristine()`
* @see {@link markAsTouched()}
* @see {@link markAsUntouched()}
* @see {@link markAsPristine()}
*
* @param opts Configuration options that determine how the control propagates changes
* and emits events after marking is applied.
Expand All @@ -870,9 +870,9 @@ export abstract class AbstractControl<TValue = any, TRawValue extends TValue = T
* and recalculates the `pristine` status of all parent
* controls.
*
* @see `markAsTouched()`
* @see `markAsUntouched()`
* @see `markAsDirty()`
* @see {@link markAsTouched()}
* @see {@link markAsUntouched()}
* @see {@link markAsDirty()}
*
* @param opts Configuration options that determine how the control emits events after
* marking is applied.
Expand Down
4 changes: 2 additions & 2 deletions packages/forms/src/model/form_control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface FormControlOptions extends AbstractControlOptions {
*
* See [usage examples below](#usage-notes).
*
* @see `AbstractControl`
* @see {@link AbstractControl}
* @see [Reactive Forms Guide](guide/reactive-forms)
* @see [Usage Notes](#usage-notes)
*
Expand Down Expand Up @@ -239,7 +239,7 @@ export interface FormControl<TValue = any> extends AbstractControl<TValue> {
* It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and
* `FormArrays`, where it does behave differently.
*
* @see `setValue` for options
* @see {@link FormControl#setValue} for options
*/
patchValue(value: TValue, options?: {
onlySelf?: boolean,
Expand Down
26 changes: 13 additions & 13 deletions packages/forms/src/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function hasValidLength(value: any): boolean {
* An `InjectionToken` for registering additional synchronous validators used with
* `AbstractControl`s.
*
* @see `NG_ASYNC_VALIDATORS`
* @see {@link NG_ASYNC_VALIDATORS}
*
* @usageNotes
*
Expand Down Expand Up @@ -65,7 +65,7 @@ export const NG_VALIDATORS = new InjectionToken<Array<Validator|Function>>('NgVa
* An `InjectionToken` for registering additional asynchronous validators used with
* `AbstractControl`s.
*
* @see `NG_VALIDATORS`
* @see {@link NG_VALIDATORS}
*
* @usageNotes
*
Expand Down Expand Up @@ -154,7 +154,7 @@ export class Validators {
* @returns A validator function that returns an error map with the
* `min` property if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static min(min: number): ValidatorFn {
Expand All @@ -178,7 +178,7 @@ export class Validators {
* @returns A validator function that returns an error map with the
* `max` property if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static max(max: number): ValidatorFn {
Expand All @@ -202,7 +202,7 @@ export class Validators {
* @returns An error map with the `required` property
* if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static required(control: AbstractControl): ValidationErrors|null {
Expand All @@ -227,7 +227,7 @@ export class Validators {
* @returns An error map that contains the `required` property
* set to `true` if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static requiredTrue(control: AbstractControl): ValidationErrors|null {
Expand Down Expand Up @@ -267,7 +267,7 @@ export class Validators {
* @returns An error map with the `email` property
* if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static email(control: AbstractControl): ValidationErrors|null {
Expand Down Expand Up @@ -301,7 +301,7 @@ export class Validators {
* @returns A validator function that returns an error map with the
* `minlength` property if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static minLength(minLength: number): ValidatorFn {
Expand Down Expand Up @@ -332,7 +332,7 @@ export class Validators {
* @returns A validator function that returns an error map with the
* `maxlength` property if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static maxLength(maxLength: number): ValidatorFn {
Expand Down Expand Up @@ -385,7 +385,7 @@ export class Validators {
* @returns A validator function that returns an error map with the
* `pattern` property if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static pattern(pattern: string|RegExp): ValidatorFn {
Expand All @@ -396,7 +396,7 @@ export class Validators {
* @description
* Validator that performs no operation.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static nullValidator(control: AbstractControl): ValidationErrors|null {
Expand All @@ -411,7 +411,7 @@ export class Validators {
* @returns A validator function that returns an error map with the
* merged error maps of the validators if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static compose(validators: null): null;
Expand All @@ -428,7 +428,7 @@ export class Validators {
* @returns A validator function that returns an error map with the
* merged error objects of the async validators if the validation check fails, otherwise `null`.
*
* @see `updateValueAndValidity()`
* @see {@link updateValueAndValidity()}
*
*/
static composeAsync(validators: (AsyncValidatorFn|null)[]): AsyncValidatorFn|null {
Expand Down

0 comments on commit 7eb5286

Please sign in to comment.