HostListener

Stable Interface Interface Overview interface HostListener { eventName : string args : string[] } Interface Description HostBinding decorator and metadata. Interface Details eventName : string args : string[] exported from @angular/core/index, defined in @angular/core/src/metadata/directives.ts

wtfEndTimeRange

Experimental Const Variable Export export wtfEndTimeRange Ends a async time range operation. [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been enabled. exported from @angular/core/index defined in @angular/core/src/profile/profile.ts

TRANSLATIONS_FORMAT

Experimental Const Variable Export export TRANSLATIONS_FORMAT exported from @angular/core/index defined in @angular/core/src/i18n/tokens.ts

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

platformDynamicServer

Experimental Const Variable Export export platformDynamicServer The server platform that supports the runtime compiler. exported from @angular/platform-server/index defined in @angular/platform-server/src/server.ts

FormGroupDirective

Stable Directive What it does Binds an existing FormGroup to a DOM element. How to use This directive accepts an existing FormGroup instance. It will then use this FormGroup instance to match any child FormControl, FormGroup, and FormArray instances to child FormControlName, FormGroupName, and FormArrayName directives. Set value: You can set the form's initial value when instantiating the FormGroup, or you can set it programmatically later using the FormGroup's setValue or patchValue metho

2. The Hero Editor

We build a simple hero editor Once Upon a Time Every story starts somewhere. Our story starts where the QuickStart ends. Run the live example for this part. Create a folder called angular2-tour-of-heroes and follow the QuickStart steps which provide the prerequisites, the folder structure, and the core files for our Tour of Heroes. Alternatively, begin with a download of the QuickStart source. We should have the following structure: angular2-tour-of-heroes app app.component.ts app.module.t

Webpack

Create your Angular 2 applications with a Webpack based tooling Webpack is a popular module bundler, a tool for bundling application source code in convenient chunks and for loading that code from a server into a browser. It's an excellent alternative to the SystemJS approach we use throughout the documentation. In this guide we get a taste of Webpack and how to use it with Angular 2 applications. Table of contents What is Webpack? Entries and outputs Loaders Plugins Configuring Webpack Commo

Angular Modules (NgModule)

Define application modules with @NgModule Angular Modules help organize an application into cohesive blocks of functionality. An Angular Module is a class adorned with the @NgModule decorator function. @NgModule takes a metadata object that tells Angular how to compile and run module code. It identifies the module's own components, directives and pipes, making some of them public so external components can use them. It may add service providers to the application dependency injectors. And there

RouterModule

Stable Class What it does Adds router directives and providers. How to use RouterModule can be imported multiple times: once per lazily-loaded bundle. Since the router deals with a global shared resource--location, we cannot have more than one router service active. That is why there are two ways to create the module: RouterModule.forRoot and RouterModule.forChild. forRoot creates a module that contains all the directives, the given routes, and the router service itself. forChild creates