parent
b94436d86c
commit
927323f24e
|
@ -66,6 +66,7 @@ import {ComponentFactoryResolver, ComponentRef, Directive, Injector, Input, NgMo
|
|||
* {@example common/ngComponentOutlet/ts/module.ts region='NgModuleFactoryExample'}
|
||||
*
|
||||
* @experimental
|
||||
* @ngModule CommonModule
|
||||
*/
|
||||
@Directive({selector: '[ngComponentOutlet]'})
|
||||
export class NgComponentOutlet implements OnChanges, OnDestroy {
|
||||
|
|
|
@ -92,7 +92,7 @@ export class NgForOfContext<T> {
|
|||
* See a [live demo](http://plnkr.co/edit/KVuXxDp0qinGDyo307QW?p=preview) for a more detailed
|
||||
* example.
|
||||
*
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
*/
|
||||
@Directive({selector: '[ngFor][ngForOf]'})
|
||||
export class NgForOf<T> implements DoCheck {
|
||||
|
|
|
@ -99,7 +99,7 @@ import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstri
|
|||
* <ng-template #elseBlock>...</ng-template>
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
*/
|
||||
@Directive({selector: '[ngIf]'})
|
||||
export class NgIf {
|
||||
|
|
|
@ -21,7 +21,7 @@ import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
|
|||
*
|
||||
* <code-example path="common/pipes/ts/lowerupper_pipe.ts" region='LowerUpperPipe'></code-example>
|
||||
*
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
*/
|
||||
@Pipe({name: 'lowercase'})
|
||||
export class LowerCasePipe implements PipeTransform {
|
||||
|
@ -63,7 +63,7 @@ const unicodeWordMatch =
|
|||
*
|
||||
* <code-example path="common/pipes/ts/titlecase_pipe.ts" region='TitleCasePipe'></code-example>
|
||||
*
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
*/
|
||||
@Pipe({name: 'titlecase'})
|
||||
export class TitleCasePipe implements PipeTransform {
|
||||
|
@ -85,6 +85,8 @@ export class TitleCasePipe implements PipeTransform {
|
|||
* Transforms text to all upper case.
|
||||
* @see `LowerCasePipe`
|
||||
* @see `TitleCasePipe`
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
*/
|
||||
@Pipe({name: 'uppercase'})
|
||||
export class UpperCasePipe implements PipeTransform {
|
||||
|
|
|
@ -60,8 +60,6 @@ function formatNumber(
|
|||
}
|
||||
|
||||
/**
|
||||
* @ngModule CommonModule
|
||||
*
|
||||
* Formats a number as text. Group sizing and separator and other locale-specific
|
||||
* configurations are based on the active locale.
|
||||
*
|
||||
|
@ -84,6 +82,7 @@ function formatNumber(
|
|||
*
|
||||
* {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}
|
||||
*
|
||||
* @ngModule CommonModule
|
||||
*/
|
||||
@Pipe({name: 'number'})
|
||||
export class DeprecatedDecimalPipe implements PipeTransform {
|
||||
|
|
|
@ -24,7 +24,8 @@ export const CHECKBOX_VALUE_ACCESSOR: any = {
|
|||
* <input type="checkbox" name="rememberLogin" ngModel>
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
|
|
@ -40,7 +40,8 @@ export const COMPOSITION_BUFFER_MODE = new InjectionToken<boolean>('CompositionE
|
|||
* <input type="text" name="searchQuery" ngModel>
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
|
|
@ -49,7 +49,8 @@ export const ngControlStatusHost = {
|
|||
* * ng-untouched
|
||||
* * ng-touched
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost})
|
||||
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
|
||||
* based on control status (valid/invalid/dirty/etc).
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
|
|
@ -73,10 +73,7 @@ const resolvedPromise = Promise.resolve(null);
|
|||
*
|
||||
* {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
|
||||
*
|
||||
* * **npm package**: `@angular/forms`
|
||||
*
|
||||
* * **NgModule**: `FormsModule`
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,ng-form,[ngForm]',
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
* @deprecated in Angular v6 and will be removed in Angular v9.
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
*/
|
||||
@Directive({selector: 'ngForm'})
|
||||
export class NgFormSelectorWarning {
|
||||
|
|
|
@ -97,11 +97,7 @@ const resolvedPromise = Promise.resolve(null);
|
|||
* * Radio buttons: `RadioControlValueAccessor`
|
||||
* * Selects: `SelectControlValueAccessor`
|
||||
*
|
||||
* **npm package**: `@angular/forms`
|
||||
*
|
||||
* **NgModule**: `FormsModule`
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[ngModel]:not([formControlName]):not([formControl])',
|
||||
|
|
|
@ -39,11 +39,7 @@ export const modelGroupProvider: any = {
|
|||
*
|
||||
* {@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'})
|
||||
export class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {
|
||||
|
|
|
@ -22,6 +22,8 @@ import {Directive} from '@angular/core';
|
|||
* ```
|
||||
*
|
||||
* @experimental
|
||||
* @ngModule ReactiveFormsModule
|
||||
* @ngModule FormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'form:not([ngNoForm]):not([ngNativeValidate])',
|
||||
|
|
|
@ -24,6 +24,8 @@ export const NUMBER_VALUE_ACCESSOR: any = {
|
|||
* ```
|
||||
* <input type="number" [(ngModel)]="age">
|
||||
* ```
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
|
|
@ -79,9 +79,8 @@ export class RadioControlRegistry {
|
|||
*
|
||||
* {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}
|
||||
*
|
||||
* * **npm package**: `@angular/forms`
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
|
|
@ -24,6 +24,8 @@ export const RANGE_VALUE_ACCESSOR: StaticProvider = {
|
|||
* ```
|
||||
* <input type="range" [(ngModel)]="age" >
|
||||
* ```
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
|
|
@ -64,10 +64,6 @@ export const formControlBinding: any = {
|
|||
*
|
||||
* {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}
|
||||
*
|
||||
* * **npm package**: `@angular/forms`
|
||||
*
|
||||
* * **NgModule**: `ReactiveFormsModule`
|
||||
*
|
||||
* ### Use with ngModel
|
||||
*
|
||||
* 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
|
||||
* the pattern is being used as the code is being updated.
|
||||
*
|
||||
*
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'})
|
||||
|
||||
|
|
|
@ -72,10 +72,6 @@ export const controlNameBinding: any = {
|
|||
* * Radio buttons: `RadioControlValueAccessor`
|
||||
* * Selects: `SelectControlValueAccessor`
|
||||
*
|
||||
* **npm package**: `@angular/forms`
|
||||
*
|
||||
* **NgModule**: `ReactiveFormsModule`
|
||||
*
|
||||
* ### Use with ngModel
|
||||
*
|
||||
* 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
|
||||
* the pattern is being used as the code is being updated.
|
||||
*
|
||||
*
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({selector: '[formControlName]', providers: [controlNameBinding]})
|
||||
export class FormControlName extends NgControl implements OnChanges, OnDestroy {
|
||||
|
|
|
@ -52,11 +52,7 @@ export const formDirectiveProvider: any = {
|
|||
*
|
||||
* {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
|
||||
*
|
||||
* **npm package**: `@angular/forms`
|
||||
*
|
||||
* **NgModule**: `ReactiveFormsModule`
|
||||
*
|
||||
*
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[formGroup]',
|
||||
|
|
|
@ -61,11 +61,7 @@ export const formGroupNameProvider: any = {
|
|||
*
|
||||
* {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}
|
||||
*
|
||||
* * **npm package**: `@angular/forms`
|
||||
*
|
||||
* * **NgModule**: `ReactiveFormsModule`
|
||||
*
|
||||
*
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]})
|
||||
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'}
|
||||
*
|
||||
* * **npm package**: `@angular/forms`
|
||||
*
|
||||
* * **NgModule**: `ReactiveFormsModule`
|
||||
*
|
||||
*
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]})
|
||||
export class FormArrayName extends ControlContainer implements OnInit, OnDestroy {
|
||||
|
|
|
@ -85,9 +85,8 @@ function _extractId(valueString: string): string {
|
|||
* https://bugzilla.mozilla.org/show_bug.cgi?id=1024350
|
||||
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/
|
||||
*
|
||||
* * **npm package**: `@angular/forms`
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
@ -164,7 +163,8 @@ export class SelectControlValueAccessor implements ControlValueAccessor {
|
|||
*
|
||||
* See docs for `SelectControlValueAccessor` for usage examples.
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({selector: 'option'})
|
||||
export class NgSelectOption implements OnDestroy {
|
||||
|
|
|
@ -68,7 +68,8 @@ abstract class HTMLCollection {
|
|||
* }
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @ngModule ReactiveFormsModule
|
||||
* @ngModule FormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
@ -175,6 +176,8 @@ export class SelectMultipleControlValueAccessor implements ControlValueAccessor
|
|||
* <option *ngFor="let c of cities" [value]="c"></option>
|
||||
* </select>
|
||||
* ```
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({selector: 'option'})
|
||||
export class NgSelectMultipleOption implements OnDestroy {
|
||||
|
|
|
@ -131,7 +131,8 @@ export const CHECKBOX_REQUIRED_VALIDATOR: StaticProvider = {
|
|||
* <input name="fullName" ngModel required>
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
@ -172,6 +173,8 @@ export class RequiredValidator implements Validator {
|
|||
* ```
|
||||
*
|
||||
* @experimental
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector:
|
||||
|
@ -207,6 +210,8 @@ export const EMAIL_VALIDATOR: any = {
|
|||
* ```
|
||||
*
|
||||
* @experimental
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
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`,
|
||||
* `formControl`, or control with `ngModel` that also has a `minlength` attribute.
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
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`,
|
||||
* `formControl`, or control with `ngModel` that also has a `maxlength` attribute.
|
||||
*
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',
|
||||
|
@ -361,6 +368,8 @@ export const PATTERN_VALIDATOR: any = {
|
|||
* <input [name]="fullName" pattern="[a-zA-Z ]*" ngModel>
|
||||
* ```
|
||||
*
|
||||
* @ngModule FormsModule
|
||||
* @ngModule ReactiveFormsModule
|
||||
*/
|
||||
@Directive({
|
||||
selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',
|
||||
|
|
Loading…
Reference in New Issue