destroyPlatform()

Experimental Function Class Export export destroyPlatform() : void Destroy the existing platform. exported from @angular/core/index defined in @angular/core/src/application_ref.ts

async()

Stable Function Class Export export async(fn: Function) : (done: any) => any Wraps a test function in an asynchronous test zone. The test will automatically complete when all asynchronous calls within this zone are done. Can be used to wrap an inject call. Example: it('...', async(inject([AClass], (object) => { object.doSomething.then(() => { expect(...); }) }); exported from @angular/core/testing/index defined in @angular/core/testing/async.ts

InjectSetupWrapper

Experimental Class Class Overview class InjectSetupWrapper { constructor(_moduleDef: () => TestModuleMetadata) inject(tokens: any[], fn: Function) : () => any } Class Description Constructor constructor(_moduleDef: () => TestModuleMetadata) Class Details inject(tokens: any[], fn: Function) : () => any exported from @angular/core/testing/index, defined in @angular/core/testing/test_bed.ts

Testing

Techniques and practices for testing an Angular 2 app This chapter offers tips and techniques for testing Angular applications. Along the way you will learn some general testing principles and techniques but the focus is on Angular testing. Contents Introduction to Angular Testing Setup The first karma test The Angular Testing Platform (ATP) The sample application and its tests A simple component test Test a component with a service dependency Test a component with an async service Test a comp

MessageBusSink

Experimental Interface Interface Overview interface MessageBusSink { initChannel(channel: string, runInZone: boolean) : void attachToZone(zone: NgZone) : void to(channel: string) : EventEmitter<any> } Interface Description Interface Details initChannel(channel: string, runInZone: boolean) : void Sets up a new channel on the MessageBusSink. MUST be called before calling to on the channel. If runInZone is true the sink will buffer messages and send only once the zone exits. if

ClassDefinition

Stable Interface Interface Overview interface ClassDefinition { extends : Type<any> constructor : Function|any[] } Interface Description Declares the interface to be used with Class. Interface Details extends : Type<any> Optional argument for specifying the superclass. constructor : Function|any[] Required constructor function for a class. The function may be optionally wrapped in an Array, in which case additional parameter annotations may be specified. The number of ar

DecimalPipe

Stable Pipe What it does Formats a number according to locale rules. How to use number_expression | number[:digitInfo] Formats a number as text. Group sizing and separator and other locale-specific configurations are based on the active locale. where expression is a number: digitInfo is a string which has a following format: {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits} minIntegerDigits is the minimum number of integer digits to use. Defaults to 1. minFractionDigits is the m

PipeTransform

Stable Interface Interface Overview interface PipeTransform { transform(value: any, ...args: any[]) : any } Interface Description Interface Details transform(value: any, ...args: any[]) : any exported from @angular/core/index, defined in @angular/core/src/change_detection/pipe_transform.ts

ValidatorFn

Stable Interface Interface Overview interface ValidatorFn { } Interface Description exported from @angular/forms/index, defined in @angular/forms/src/directives/validators.ts

AbstractFormGroupDirective

Stable Class Class Overview class AbstractFormGroupDirective { ngOnInit() : void ngOnDestroy() : void control : FormGroup path : string[] formDirective : Form validator : ValidatorFn asyncValidator : AsyncValidatorFn } Class Description This is a base class for code shared between NgModelGroup and FormGroupName. Class Details ngOnInit() : void ngOnDestroy() : void control : FormGroup Get the FormGroup backing this binding. path : string[] Get the path to this control gro