NgSwitch

Stable Directive What it does Adds / removes DOM sub-trees when the nest match expressions matches the switch expression. How to use <container-element [ngSwitch]="switch_expression"> <some-element *ngSwitchCase="match_expression_1">...</some-element> <some-element *ngSwitchCase="match_expression_2">...</some-element> <some-other-element *ngSwitchCase="match_expression_3">...</some-other-element> <ng-container *ngSwitchCase="match_expres

NgPlural

Experimental Directive What it does Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization. How to use <some-element [ngPlural]="value"> <ng-container *ngPluralCase="'=0'">there is nothing</ng-container> <ng-container *ngPluralCase="'=1'">there is one</ng-container> <ng-container *ngPluralCase="'few'">there are a few</ng-container> <ng-container *ngPluralCase="'other'">there are exactly #</ng-container>

NgStyle

Stable Directive What it does Update an HTML element styles. How to use <some-element [ngStyle]="{'font-style': styleExp}">...</some-element> <some-element [ngStyle]="{'max-width.px': widthExp}">...</some-element> <some-element [ngStyle]="objExp">...</some-element> Class Overview class NgStyle { constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer) ngStyle ngDoCheck() } Selectors [ngStyle] Class Description

NgSwitchCase

Stable Directive What it does Creates a view that will be added/removed from the parent NgSwitch when the given expression evaluate to respectively the same/different value as the switch expression. How to use <container-element [ngSwitch]="switch_expression"> <some-element *ngSwitchCase="match_expression_1">...</some-element> </container-element> Class Overview class NgSwitchCase { constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Obje

NgModelGroup

Stable Directive What it does Creates and binds a FormGroup instance to a DOM element. How to use 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 come in handy if you want to validate a sub-group of your form separately from the rest of your form, or if some values in your domain model make more sense to consume together in a nested object. Pass in the name you

NgModuleFactoryLoader

Stable Class Class Overview class NgModuleFactoryLoader { load(path: string) : Promise<NgModuleFactory<any>> } Class Description Used to load ng module factories. Class Details load(path: string) : Promise<NgModuleFactory<any>> exported from @angular/core/index, defined in @angular/core/src/linker/ng_module_factory_loader.ts

NgModule

Stable Interface Interface Overview interface NgModule { providers : Provider[] declarations : Array<Type<any>|any[]> imports : Array<Type<any>|ModuleWithProviders|any[]> exports : Array<Type<any>|any[]> entryComponents : Array<Type<any>|any[]> bootstrap : Array<Type<any>|any[]> schemas : Array<SchemaMetadata|any[]> id : string } Interface Description NgModule decorator and metadata Interface Details provid

NgModel

Stable Directive What it does Creates a FormControl instance from a domain model and binds it to a form control element. 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. How to use This directive can be used by itself or as part of a larger form. All you need is the ngModel selector to activate

NgModuleFactory

Experimental Class Class Overview class NgModuleFactory { constructor(_injectorClass: {new (parentInjector: Injector): NgModuleInjector<T>}, _moduleType: Type<T>) moduleType : Type<T> create(parentInjector: Injector) : NgModuleRef<T> } Class Description Constructor constructor(_injectorClass: {new (parentInjector: Injector): NgModuleInjector<T>}, _moduleType: Type<T>) Class Details moduleType : Type<T> create(parentInjector: Injector

NgLocalization

Experimental Class Class Overview class NgLocalization { getPluralCategory(value: any) : string } Class Description Class Details getPluralCategory(value: any) : string exported from @angular/common/index, defined in @angular/common/src/localization.ts