ExistingProvider

Stable Interface What it does Configures the Injector to return a value of another useExisting token. How to use const provider: ExistingProvider = {provide: 'someToken', useExisting: 'someOtherToken'}; Interface Overview interface ExistingProvider { provide : any useExisting : any multi : boolean } Interface Description For more details, see the Dependency Injection Guide. Example class Greeting { salutation = 'Hello'; } class FormalGreeting extends Greeting { salutation =

EVENT_MANAGER_PLUGINS

Stable Const Variable Export export EVENT_MANAGER_PLUGINS exported from @angular/platform-browser/index defined in @angular/platform-browser/src/dom/events/event_manager.ts

EventManager

Stable Class Class Overview class EventManager { constructor(plugins: EventManagerPlugin[], _zone: NgZone) addEventListener(element: HTMLElement, eventName: string, handler: Function) : Function addGlobalEventListener(target: string, eventName: string, handler: Function) : Function getZone() : NgZone } Class Description Annotations @Injectable() Constructor constructor(plugins: EventManagerPlugin[], _zone: NgZone) Class Details addEventListener(element: HTMLElement, event

EventEmitter

Stable Class Class Overview class EventEmitter { constructor(isAsync?: boolean) emit(value?: T) subscribe(generatorOrNext?: any, error?: any, complete?: any) : any } Class Description Use by directives and components to emit custom Events. Examples In the following example, Zippy alternatively emits open and close events when its title gets clicked: @Component({ selector: 'zippy', template: ` <div class="zippy"> <div (click)="toggle()">Toggle</div>

Event

Stable Type-alias What it does Represents a router event. Please see NavigationStart, NavigationEnd, NavigationCancel, NavigationError, RoutesRecognized for more information. Interface Overview interface Event { } Interface Description exported from @angular/router/index, defined in @angular/router/src/router.ts

ErrorHandler

Stable Class Class Overview class ErrorHandler { constructor(rethrowError?: boolean) handleError(error: any) : void } Class Description Provides a hook for centralized exception handling. The default implementation of ErrorHandler prints error messages to the Console. To intercept error handling, write a custom exception handler that replaces this default as appropriate for your app. Example class MyErrorHandler implements ErrorHandler { call(error, stackTrace = null, reason =

enableProdMode()

Stable Function Class Export export enableProdMode() : void Disable Angular's development mode, which turns off assertions and other checks within the framework. One important assertion this disables verifies that a change detection pass does not result in additional changes to any bindings (also known as unidirectional data flow). exported from @angular/core/index defined in @angular/core/src/application_ref.ts

enableDebugTools()

Experimental Function Class Export export enableDebugTools(ref: ComponentRef<T>) : ComponentRef<T> Enabled Angular 2 debug tools that are accessible via your browser's developer console. Usage: Open developer console (e.g. in Chrome Ctrl + Shift + j) Type ng. (usually the console will show auto-complete suggestion) Try the change detection profiler ng.profiler.timeChangeDetection() then hit Enter. exported from @angular/platform-browser/index defined in @angular/platform-browser

EmbeddedViewRef

Experimental Class Class Overview class EmbeddedViewRef { C context : C rootNodes : any[] destroy() : void } Class Description Represents an Angular View. A View is a fundamental building block of the application UI. It is the smallest grouping of Elements which are created and destroyed together. Properties of elements in a View can change, but the structure (number and order) of elements in a View cannot. Changing the structure of Elements can only be done by inserting, moving

ElementRef

Stable Security Risk Class Security Risk Permitting direct access to the DOM can make your application more vulnerable to XSS attacks. Carefully review any use of ElementRef in your code. For more detail, see the Security Guide. Class Overview class ElementRef { constructor(nativeElement: any) nativeElement : any } Class Description Constructor constructor(nativeElement: any) Class Details nativeElement : any The underlying native element or null if direct access to native e