NgControlStatusGroup

Stable Directive Class Overview class NgControlStatusGroup { constructor(cd: ControlContainer) } Selectors [formGroupName] [formArrayName] [ngModelGroup] [formGroup] form:not([ngNoForm]) [ngForm] Class Description Directive automatically applied to Angular form groups that sets CSS classes based on control status (valid/invalid/dirty/etc). Constructor constructor(cd: ControlContainer) exported from @angular/forms/index, defined in @angular/forms/src/directives/ng_control_statu

NgControl

Stable Class Class Overview class NgControl { name : string valueAccessor : ControlValueAccessor validator : ValidatorFn asyncValidator : AsyncValidatorFn viewToModelUpdate(newValue: any) : void } Class Description A base class that all control directive extend. It binds a FormControl object to a DOM element. Used internally by Angular forms. Class Details name : string valueAccessor : ControlValueAccessor validator : ValidatorFn asyncValidator : AsyncValidatorFn viewToMode

NgForm

Stable Directive What it does Creates a top-level FormGroup instance and binds it to a form to track aggregate form value and validation status. How to use 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 FormGroup instan

NgIf

Stable Directive Class Overview class NgIf { constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<Object>) ngIf } Selectors [ngIf] Class Description Removes or recreates a portion of the DOM tree based on an {expression}. If the expression assigned to ngIf evaluates to a false value then the element is removed from the DOM, otherwise a clone of the element is reinserted into the DOM. Example (live demo): <div *ngIf="errorCount > 0" class="error">

NgFor

Stable Directive Class Overview class NgFor { constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForRow>, _differs: IterableDiffers, _cdr: ChangeDetectorRef) ngForOf : any ngForTrackBy : TrackByFn ngForTemplate ngOnChanges(changes: SimpleChanges) : void ngDoCheck() } Selectors [ngFor][ngForOf] Class Description The NgFor directive instantiates a template once per item from an iterable. The context for each instantiated template inherits from t

NgClass

Stable Directive What it does Adds and removes CSS classes on an HTML element. How to use <some-element [ngClass]="'first second'">...</some-element> <some-element [ngClass]="['first', 'second']">...</some-element> <some-element [ngClass]="{'first': true, 'second': true, 'third': false}">...</some-element> <some-element [ngClass]="stringExp|arrayExp|objExp">...</some-element> Class Overview class NgClass { constructor(_iterableDiffers

NgControlStatus

Stable Directive Class Overview class NgControlStatus { constructor(cd: NgControl) } Selectors [formControlName] [ngModel] [formControl] Class Description Directive automatically applied to Angular form controls that sets CSS classes based on control status (valid/invalid/dirty/etc). Constructor constructor(cd: NgControl) exported from @angular/forms/index, defined in @angular/forms/src/directives/ng_control_status.ts

NavigationStart

Stable Class What it does Represents an event triggered when a navigation starts. Class Overview class NavigationStart { constructor(id: number, url: string) id : number url : string toString() : string } Class Description Constructor constructor(id: number, url: string) Class Details id : number url : string toString() : string exported from @angular/router/index, defined in @angular/router/src/router.ts

NavigationError

Stable Class What it does Represents an event triggered when a navigation fails due to an unexpected error. Class Overview class NavigationError { constructor(id: number, url: string, error: any) id : number url : string error : any toString() : string } Class Description Constructor constructor(id: number, url: string, error: any) Class Details id : number url : string error : any toString() : string exported from @angular/router/index, defined in @angular/router/s

MockLocationStrategy

Stable Class Class Overview class MockLocationStrategy { constructor() internalBaseHref : string internalPath : string internalTitle : string urlChanges : string[] simulatePopState(url: string) : void path(includeHash?: boolean) : string prepareExternalUrl(internal: string) : string pushState(ctx: any, title: string, path: string, query: string) : void replaceState(ctx: any, title: string, path: string, query: string) : void onPopState(fn: (value: any) => void)