PathLocationStrategy

Stable Class Class Overview class PathLocationStrategy { constructor(_platformLocation: PlatformLocation, href?: string) onPopState(fn: LocationChangeListener) : void getBaseHref() : string prepareExternalUrl(internal: string) : string path(includeHash?: boolean) : string pushState(state: any, title: string, url: string, queryParams: string) replaceState(state: any, title: string, url: string, queryParams: string) forward() : void back() : void } Class Description P

Npm Packages

Recommended npm packages, and how to specify package dependencies Angular applications and Angular itself depend upon features and functionality provided by a variety of third-party packages. These packages are maintained and installed with the Node Package Manager (npm). Node.js and npm are essential to Angular 2 development. Get them now if they're not already installed on your machine. Verify that you are running node v4.x.x or higher and npm 3.x.x or higher by running the commands node -

OpaqueToken

Stable Class Class Overview class OpaqueToken { constructor(_desc: string) toString() : string } Class Description Creates a token that can be used in a DI Provider. Example (live demo) var t = new OpaqueToken("value"); var injector = Injector.resolveAndCreate([ {provide: t, useValue: "bindingValue"} ]); expect(injector.get(t)).toEqual("bindingValue"); Using an OpaqueToken is preferable to using strings as tokens because of possible collisions caused by multiple providers us

OnChanges

Stable Class What it does Lifecycle hook that is called when any data-bound property of a directive changes. How to use . @Component({selector: 'my-cmp', template: `...`}) class MyComponent implements OnChanges { @Input() prop: number; ngOnChanges(changes: SimpleChanges) { // changes.prop contains the old and the new value... } } Class Overview class OnChanges { ngOnChanges(changes: SimpleChanges) : void } Class Description ngOnChanges is called right after the data-bou

Params

Stable Type-alias Interface Overview interface Params { } Interface Description A collection of parameters. exported from @angular/router/index, defined in @angular/router/src/shared.ts

OnInit

Stable Class What it does Lifecycle hook that is called after data-bound properties of a directive are initialized. How to use . @Component({selector: 'my-cmp', template: `...`}) class MyComponent implements OnInit { ngOnInit() { // ... } } Class Overview class OnInit { ngOnInit() : void } Class Description ngOnInit is called right after the directive's data-bound properties have been checked for the first time, and before any of its children have been checked. It is invoked

Output

Stable Interface Interface Overview interface Output { bindingPropertyName : string } Interface Description Output decorator and metadata. Interface Details bindingPropertyName : string exported from @angular/core/index, defined in @angular/core/src/metadata/directives.ts

OnDestroy

Stable Class What it does Lifecycle hook that is called when a directive or pipe is destroyed. How to use . @Component({selector: 'my-cmp', template: `...`}) class MyComponent implements OnDestroy { ngOnDestroy() { // ... } } Class Overview class OnDestroy { ngOnDestroy() : void } Class Description ngOnDestroy callback is typically used for any custom cleanup that needs to occur when the instance is destroyed. See Lifecycle Hooks Guide. Class Details ngOnDestroy() : void

PACKAGE_ROOT_URL

Experimental Const Variable Export export PACKAGE_ROOT_URL A token which indicates the root directory of the application exported from @angular/core/index defined in @angular/core/src/application_tokens.ts

NG_ASYNC_VALIDATORS

Stable Const Variable Export export NG_ASYNC_VALIDATORS Providers for asynchronous validators to be used for FormControls in a form. Provide this using multi: true to add validators. See NG_VALIDATORS for more details. exported from @angular/forms/index defined in @angular/forms/src/validators.ts