platformWorkerApp

Experimental Const Variable Export export platformWorkerApp exported from @angular/platform-webworker/index defined in @angular/platform-webworker/src/worker_app.ts

AnimationWithStepsMetadata

Experimental Class Class Overview class AnimationWithStepsMetadata { constructor() steps : AnimationMetadata[] } Class Description Constructor constructor() Class Details steps : AnimationMetadata[] exported from @angular/core/index, defined in @angular/core/src/animation/metadata.ts

RouterStateSnapshot

Stable Interface What it does Represents the state of the router at a moment in time. How to use @Component({templateUrl:'template.html'}) class MyComponent { constructor(router: Router) { const state: RouterState = router.routerState; const snapshot: RouterStateSnapshot = state.snapshot; const root: ActivatedRouteSnapshot = snapshot.root; const child = root.firstChild; const id: Observable<string> = child.params.map(p => p.id); //... } } Interface O

RouterTestingModule

Stable Class What it does Sets up the router to be used for testing. How to use beforeEach(() => { TestBed.configureTestModule({ modules: [ RouterTestingModule.withRoutes( [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}])] ) ] }); }); Class Overview class RouterTestingModule { staticwithRoutes(routes: Routes) : ModuleWithProviders } Class Description The modules sets up the router to be used for testing. It provides spy imp

state()

Experimental Function Class Export export state(stateNameExpr: string, styles: AnimationStyleMetadata) : AnimationStateDeclarationMetadata state is an animation-specific function that is designed to be used inside of Angular2's animation DSL language. If this information is new, please navigate to the component animations metadata page to gain a better understanding of how animations in Angular2 are used. state declares an animation state within the given trigger. When a state is active with

Attribute Directives

Attribute directives attach behavior to elements. An Attribute directive changes the appearance or behavior of a DOM element. In this chapter we will write an attribute directive to change the background color apply the attribute directive to an element in a template respond to user-initiated events pass values into the directive using data binding Try the live example. Directives overview There are three kinds of directives in Angular: Components Structural directives Attribute directives

DatePipe

Stable Pipe What it does Formats a date according to locale rules. How to use date_expression | date[:format] NgModuleCommonModule Description Where: expression is a date object or a number (milliseconds since UTC epoch) or an ISO string (https://www.w3.org/TR/NOTE-datetime). format indicates which date/time components to include. The format can be predifined as shown below or custom as shown in the table. 'medium': equivalent to 'yMMMdjms' (e.g. Sep 3, 2010, 12:05:08 PM for en-US)

XHRBackend

Experimental Class Class Overview class XHRBackend { constructor(_browserXHR: BrowserXhr, _baseResponseOptions: ResponseOptions, _xsrfStrategy: XSRFStrategy) createConnection(request: Request) : XHRConnection } Class Description Creates XHRConnection instances. This class would typically not be used by end users, but could be overridden if a different backend implementation should be used, such as in a node backend. Example import {Http, MyNodeBackend, HTTP_PROVIDERS, BaseRequest

flushMicrotasks()

Experimental Function Class Export export flushMicrotasks() : void Flush any pending microtasks. exported from @angular/core/testing/index defined in @angular/core/testing/fake_async.ts

AnimationStateDeclarationMetadata

Experimental Class Class Overview class AnimationStateDeclarationMetadata { constructor(stateNameExpr: string, styles: AnimationStyleMetadata) stateNameExpr : string styles : AnimationStyleMetadata } Class Description Metadata representing the entry of animations. Instances of this class are provided via the animation DSL when the state animation function is called. Constructor constructor(stateNameExpr: string, styles: AnimationStyleMetadata) Class Details stateNameExpr :