docs: add missing `@ngModule` tags (#25734)

PR Close #25734
This commit is contained in:
Pete Bacon Darwin 2018-09-08 17:53:53 +01:00 committed by Kara Erickson
parent b94436d86c
commit 927323f24e
23 changed files with 53 additions and 61 deletions

View File

@ -66,6 +66,7 @@ import {ComponentFactoryResolver, ComponentRef, Directive, Injector, Input, NgMo
* {@example common/ngComponentOutlet/ts/module.ts region='NgModuleFactoryExample'} * {@example common/ngComponentOutlet/ts/module.ts region='NgModuleFactoryExample'}
* *
* @experimental * @experimental
* @ngModule CommonModule
*/ */
@Directive({selector: '[ngComponentOutlet]'}) @Directive({selector: '[ngComponentOutlet]'})
export class NgComponentOutlet implements OnChanges, OnDestroy { export class NgComponentOutlet implements OnChanges, OnDestroy {

View File

@ -92,7 +92,7 @@ export class NgForOfContext<T> {
* See a [live demo](http://plnkr.co/edit/KVuXxDp0qinGDyo307QW?p=preview) for a more detailed * See a [live demo](http://plnkr.co/edit/KVuXxDp0qinGDyo307QW?p=preview) for a more detailed
* example. * example.
* *
* * @ngModule CommonModule
*/ */
@Directive({selector: '[ngFor][ngForOf]'}) @Directive({selector: '[ngFor][ngForOf]'})
export class NgForOf<T> implements DoCheck { export class NgForOf<T> implements DoCheck {

View File

@ -99,7 +99,7 @@ import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstri
* <ng-template #elseBlock>...</ng-template> * <ng-template #elseBlock>...</ng-template>
* ``` * ```
* *
* * @ngModule CommonModule
*/ */
@Directive({selector: '[ngIf]'}) @Directive({selector: '[ngIf]'})
export class NgIf { export class NgIf {

View File

@ -21,7 +21,7 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
* *
* <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example> * <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example>
* *
* * @ngModule CommonModule
*/ */
@Pipe({name: 'lowercase'}) @Pipe({name: 'lowercase'})
export class LowerCasePipe implements PipeTransform { export class LowerCasePipe implements PipeTransform {
@ -63,7 +63,7 @@ const unicodeWordMatch =
* *
* <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example> * <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example>
* *
* * @ngModule CommonModule
*/ */
@Pipe({name: 'titlecase'}) @Pipe({name: 'titlecase'})
export class TitleCasePipe implements PipeTransform { export class TitleCasePipe implements PipeTransform {
@ -85,6 +85,8 @@ export class TitleCasePipe implements PipeTransform {
* Transforms text to all upper case. * Transforms text to all upper case.
* @see `LowerCasePipe` * @see `LowerCasePipe`
* @see `TitleCasePipe` * @see `TitleCasePipe`
*
* @ngModule CommonModule
*/ */
@Pipe({name: 'uppercase'}) @Pipe({name: 'uppercase'})
export class UpperCasePipe implements PipeTransform { export class UpperCasePipe implements PipeTransform {

View File

@ -60,8 +60,6 @@ function formatNumber(
} }
/** /**
* @ngModule CommonModule
*
* Formats a number as text. Group sizing and separator and other locale-specific * Formats a number as text. Group sizing and separator and other locale-specific
* configurations are based on the active locale. * configurations are based on the active locale.
* *
@ -84,6 +82,7 @@ function formatNumber(
* *
* {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'} * {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}
* *
* @ngModule CommonModule
*/ */
@Pipe({name: 'number'}) @Pipe({name: 'number'})
export class DeprecatedDecimalPipe implements PipeTransform { export class DeprecatedDecimalPipe implements PipeTransform {

View File

@ -24,7 +24,8 @@ export const CHECKBOX_VALUE_ACCESSOR: any = {
* <input type="checkbox" name="rememberLogin" ngModel> * <input type="checkbox" name="rememberLogin" ngModel>
* ``` * ```
* *
* * @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -40,7 +40,8 @@ export const COMPOSITION_BUFFER_MODE = new InjectionToken<boolean>('CompositionE
* <input type="text" name="searchQuery" ngModel> * <input type="text" name="searchQuery" ngModel>
* ``` * ```
* *
* * @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -49,7 +49,8 @@ export const ngControlStatusHost = {
* * ng-untouched * * ng-untouched
* * ng-touched * * ng-touched
* *
* * @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost}) @Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost})
export class NgControlStatus extends AbstractControlStatus { export class NgControlStatus extends AbstractControlStatus {
@ -60,7 +61,8 @@ export class NgControlStatus extends AbstractControlStatus {
* Directive automatically applied to Angular form groups that sets CSS classes * Directive automatically applied to Angular form groups that sets CSS classes
* based on control status (valid/invalid/dirty/etc). * based on control status (valid/invalid/dirty/etc).
* *
* * @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -73,10 +73,7 @@ const resolvedPromise = Promise.resolve(null);
* *
* {@example forms/ts/simpleForm/simple_form_example.ts region='Component'} * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms` * @ngModule FormsModule
*
* * **NgModule**: `FormsModule`
*
*/ */
@Directive({ @Directive({
selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,ng-form,[ngForm]', selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,ng-form,[ngForm]',

View File

@ -18,7 +18,7 @@ export const NG_FORM_SELECTOR_WARNING = new InjectionToken('NgFormSelectorWarnin
* This directive is solely used to display warnings when the deprecated `ngForm` selector is used. * This directive is solely used to display warnings when the deprecated `ngForm` selector is used.
* *
* @deprecated in Angular v6 and will be removed in Angular v9. * @deprecated in Angular v6 and will be removed in Angular v9.
* * @ngModule FormsModule
*/ */
@Directive({selector: 'ngForm'}) @Directive({selector: 'ngForm'})
export class NgFormSelectorWarning { export class NgFormSelectorWarning {

View File

@ -97,11 +97,7 @@ const resolvedPromise = Promise.resolve(null);
* * Radio buttons: `RadioControlValueAccessor` * * Radio buttons: `RadioControlValueAccessor`
* * Selects: `SelectControlValueAccessor` * * Selects: `SelectControlValueAccessor`
* *
* **npm package**: `@angular/forms` * @ngModule FormsModule
*
* **NgModule**: `FormsModule`
*
*
*/ */
@Directive({ @Directive({
selector: '[ngModel]:not([formControlName]):not([formControl])', selector: '[ngModel]:not([formControlName]):not([formControl])',

View File

@ -39,11 +39,7 @@ export const modelGroupProvider: any = {
* *
* {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'} * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms` * @ngModule FormsModule
*
* * **NgModule**: `FormsModule`
*
*
*/ */
@Directive({selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'}) @Directive({selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'})
export class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy { export class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {

View File

@ -22,6 +22,8 @@ import {Directive} from '@angular/core';
* ``` * ```
* *
* @experimental * @experimental
* @ngModule ReactiveFormsModule
* @ngModule FormsModule
*/ */
@Directive({ @Directive({
selector: 'form:not([ngNoForm]):not([ngNativeValidate])', selector: 'form:not([ngNoForm]):not([ngNativeValidate])',

View File

@ -24,6 +24,8 @@ export const NUMBER_VALUE_ACCESSOR: any = {
* ``` * ```
* <input type="number" [(ngModel)]="age"> * <input type="number" [(ngModel)]="age">
* ``` * ```
* @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -79,9 +79,8 @@ export class RadioControlRegistry {
* *
* {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'} * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}
* *
* * **npm package**: `@angular/forms` * @ngModule FormsModule
* * @ngModule ReactiveFormsModule
*
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -24,6 +24,8 @@ export const RANGE_VALUE_ACCESSOR: StaticProvider = {
* ``` * ```
* <input type="range" [(ngModel)]="age" > * <input type="range" [(ngModel)]="age" >
* ``` * ```
* @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -64,10 +64,6 @@ export const formControlBinding: any = {
* *
* {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'} * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms`
*
* * **NgModule**: `ReactiveFormsModule`
*
* ### Use with ngModel * ### Use with ngModel
* *
* Support for using the `ngModel` input property and `ngModelChange` event with reactive * Support for using the `ngModel` input property and `ngModelChange` event with reactive
@ -134,7 +130,7 @@ export const formControlBinding: any = {
* pattern with a config value of `"always"`. This may help to track down where in the code * pattern with a config value of `"always"`. This may help to track down where in the code
* the pattern is being used as the code is being updated. * the pattern is being used as the code is being updated.
* *
* * @ngModule ReactiveFormsModule
*/ */
@Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'}) @Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'})

View File

@ -72,10 +72,6 @@ export const controlNameBinding: any = {
* * Radio buttons: `RadioControlValueAccessor` * * Radio buttons: `RadioControlValueAccessor`
* * Selects: `SelectControlValueAccessor` * * Selects: `SelectControlValueAccessor`
* *
* **npm package**: `@angular/forms`
*
* **NgModule**: `ReactiveFormsModule`
*
* ### Use with ngModel * ### Use with ngModel
* *
* Support for using the `ngModel` input property and `ngModelChange` event with reactive * Support for using the `ngModel` input property and `ngModelChange` event with reactive
@ -146,7 +142,7 @@ export const controlNameBinding: any = {
* pattern with a config value of `"always"`. This may help to track down where in the code * pattern with a config value of `"always"`. This may help to track down where in the code
* the pattern is being used as the code is being updated. * the pattern is being used as the code is being updated.
* *
* * @ngModule ReactiveFormsModule
*/ */
@Directive({selector: '[formControlName]', providers: [controlNameBinding]}) @Directive({selector: '[formControlName]', providers: [controlNameBinding]})
export class FormControlName extends NgControl implements OnChanges, OnDestroy { export class FormControlName extends NgControl implements OnChanges, OnDestroy {

View File

@ -52,11 +52,7 @@ export const formDirectiveProvider: any = {
* *
* {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'} * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
* *
* **npm package**: `@angular/forms` * @ngModule ReactiveFormsModule
*
* **NgModule**: `ReactiveFormsModule`
*
*
*/ */
@Directive({ @Directive({
selector: '[formGroup]', selector: '[formGroup]',

View File

@ -61,11 +61,7 @@ export const formGroupNameProvider: any = {
* *
* {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'} * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms` * @ngModule ReactiveFormsModule
*
* * **NgModule**: `ReactiveFormsModule`
*
*
*/ */
@Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]}) @Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]})
export class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { export class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {
@ -136,11 +132,7 @@ export const formArrayNameProvider: any = {
* *
* {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'} * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms` * @ngModule ReactiveFormsModule
*
* * **NgModule**: `ReactiveFormsModule`
*
*
*/ */
@Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]}) @Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]})
export class FormArrayName extends ControlContainer implements OnInit, OnDestroy { export class FormArrayName extends ControlContainer implements OnInit, OnDestroy {

View File

@ -85,9 +85,8 @@ function _extractId(valueString: string): string {
* https://bugzilla.mozilla.org/show_bug.cgi?id=1024350 * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/ * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/
* *
* * **npm package**: `@angular/forms` * @ngModule FormsModule
* * @ngModule ReactiveFormsModule
*
*/ */
@Directive({ @Directive({
selector: selector:
@ -164,7 +163,8 @@ export class SelectControlValueAccessor implements ControlValueAccessor {
* *
* See docs for `SelectControlValueAccessor` for usage examples. * See docs for `SelectControlValueAccessor` for usage examples.
* *
* * @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({selector: 'option'}) @Directive({selector: 'option'})
export class NgSelectOption implements OnDestroy { export class NgSelectOption implements OnDestroy {

View File

@ -68,7 +68,8 @@ abstract class HTMLCollection {
* } * }
* ``` * ```
* *
* * @ngModule ReactiveFormsModule
* @ngModule FormsModule
*/ */
@Directive({ @Directive({
selector: selector:
@ -175,6 +176,8 @@ export class SelectMultipleControlValueAccessor implements ControlValueAccessor
* <option *ngFor="let c of cities" [value]="c"></option> * <option *ngFor="let c of cities" [value]="c"></option>
* </select> * </select>
* ``` * ```
* @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({selector: 'option'}) @Directive({selector: 'option'})
export class NgSelectMultipleOption implements OnDestroy { export class NgSelectMultipleOption implements OnDestroy {

View File

@ -131,7 +131,8 @@ export const CHECKBOX_REQUIRED_VALIDATOR: StaticProvider = {
* <input name="fullName" ngModel required> * <input name="fullName" ngModel required>
* ``` * ```
* *
* * @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: selector:
@ -172,6 +173,8 @@ export class RequiredValidator implements Validator {
* ``` * ```
* *
* @experimental * @experimental
* @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: selector:
@ -207,6 +210,8 @@ export const EMAIL_VALIDATOR: any = {
* ``` * ```
* *
* @experimental * @experimental
* @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: '[email][formControlName],[email][formControl],[email][ngModel]', selector: '[email][formControlName],[email][formControl],[email][ngModel]',
@ -254,7 +259,8 @@ export const MIN_LENGTH_VALIDATOR: any = {
* A directive which installs the `MinLengthValidator` for any `formControlName`, * A directive which installs the `MinLengthValidator` for any `formControlName`,
* `formControl`, or control with `ngModel` that also has a `minlength` attribute. * `formControl`, or control with `ngModel` that also has a `minlength` attribute.
* *
* * @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]', selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',
@ -306,7 +312,8 @@ export const MAX_LENGTH_VALIDATOR: any = {
* A directive which installs the `MaxLengthValidator` for any `formControlName`, * A directive which installs the `MaxLengthValidator` for any `formControlName`,
* `formControl`, or control with `ngModel` that also has a `maxlength` attribute. * `formControl`, or control with `ngModel` that also has a `maxlength` attribute.
* *
* * @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]', selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',
@ -361,6 +368,8 @@ export const PATTERN_VALIDATOR: any = {
* <input [name]="fullName" pattern="[a-zA-Z ]*" ngModel> * <input [name]="fullName" pattern="[a-zA-Z ]*" ngModel>
* ``` * ```
* *
* @ngModule FormsModule
* @ngModule ReactiveFormsModule
*/ */
@Directive({ @Directive({
selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]', selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',