ChangeDetectionStrategy

Stable Enum Class Overview class ChangeDetectionStrategy { OnPush Default } Class Description Describes within the change detector which strategy will be used the next time change detection is triggered. Class Details OnPush OnPush means that the change detector's mode will be set to CheckOnce during hydration. Default Default means that the change detector's mode will be set to CheckAlways during hydration. exported from @angular/core/index, defined in @angular/core/src/change_d

CanDeactivate

Stable Interface What it does Indicates that a class can implement to be a guard deciding if a route can be deactivated. How to use class UserToken {} class Permissions { canDeactivate(user: UserToken, id: string): boolean { return true; } } @Injectable() class CanDeactivateTeam implements CanDeactivate<TeamComponent> { constructor(private permissions: Permissions, private currentUser: UserToken) {} canDeactivate( component: TeamComponent, route: ActivatedRouteS

ChangeDetectorRef

Stable Class Class Overview class ChangeDetectorRef { markForCheck() : void detach() : void detectChanges() : void checkNoChanges() : void reattach() : void } Class Description Class Details markForCheck() : void Marks all ChangeDetectionStrategy ancestors as to be checked. (live demo) @Component({ selector: 'cmp', changeDetection: ChangeDetectionStrategy.OnPush, template: `Number of ticks: {{numberOfTicks}}` }) class Cmp { numberOfTicks = 0; constructor(ref: Chang

Class()

Stable Function Class Export export Class(clsDef: ClassDefinition) : Type<any> Provides a way for expressing ES6 classes with parameter annotations in ES5. Basic Example var Greeter = ng.Class({ constructor: function(name) { this.name = name; }, greet: function() { alert('Hello ' + this.name + '!'); } }); is equivalent to ES6: class Greeter { constructor(name) { this.name = name; } greet() { alert('Hello ' + this.name + '!'); } } or equivalent to ES5

BrowserDynamicTestingModule

Stable Class Class Overview class BrowserDynamicTestingModule { } Class Description NgModule for testing. Annotations @NgModule({ exports: [BrowserTestingModule], providers: [ {provide: TestComponentRenderer, useClass: DOMTestComponentRenderer}, ] }) exported from @angular/platform-browser-dynamic/testing/index, defined in @angular/platform-browser-dynamic/testing/index.ts

Browser support

Browser support and polyfills guide. Browser support Angular supports most recent browsers. This includes the following specific versions: Chrome Firefox Edge IE Safari iOS Android IE mobile latest latest 14 11 9 9 Marshmallow (6.0) 11 13 10 8 8 Lollipop(5.0, 5.1) 9 7 7 KitKat(4.4) Jelly Bean(4.1, 4.2, 4.3) Angular's continuous integration process runs unit tests of the framework on all of these browsers for every pull request, using SauceLabs and Browserstack. Polyfills Angul

BrowserModule

Stable Class Class Overview class BrowserModule { constructor(parentModule: BrowserModule) } Class Description The ng module for the browser. Annotations @NgModule({ providers: [ BROWSER_SANITIZATION_PROVIDERS, {provide: ErrorHandler, useFactory: errorHandler, deps: []}, {provide: DOCUMENT, useFactory: _document, deps: []}, {provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true}, {provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi:

BrowserXhr

Experimental Class Class Overview class BrowserXhr { constructor() build() : any } Class Description A backend for http that uses the XMLHttpRequest browser API. Take care not to evaluate this in non-browser contexts. Annotations @Injectable() Constructor constructor() Class Details build() : any exported from @angular/http/index, defined in @angular/http/src/backends/browser_xhr.ts

BrowserTestingModule

Stable Class Class Overview class BrowserTestingModule { } Class Description NgModule for testing. Annotations @NgModule({ exports: [BrowserModule], providers: [ {provide: APP_ID, useValue: 'a'}, ELEMENT_PROBE_PROVIDERS, {provide: NgZone, useFactory: createNgZone}, {provide: AnimationDriver, useValue: AnimationDriver.NOOP} ] }) exported from @angular/platform-browser/testing/index, defined in @angular/platform-browser/testing/browser.ts

CanActivate

Stable Interface What it does Indicates that a class can implement to be a guard deciding if a route can be activated. How to use class UserToken {} class Permissions { canActivate(user: UserToken, id: string): boolean { return true; } } @Injectable() class CanActivateTeam implements CanActivate { constructor(private permissions: Permissions, private currentUser: UserToken) {} canActivate( route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable<bo