ValidatorFn

Stable Interface Interface Overview interface ValidatorFn { } Interface Description exported from @angular/forms/index, defined in @angular/forms/src/directives/validators.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

ServiceMessageBroker

Experimental Class Class Overview class ServiceMessageBroker { registerMethod(methodName: string, signature: Type<any>[], method: Function, returnType?: Type<any>) : void } Class Description Helper class for UIComponents that allows components to register methods. If a registered method message is received from the broker on the worker, the UIMessageBroker deserializes its arguments and calls the registered method. If that method returns a promise, the UIMessageBroker returns

RouterOutletMap

Stable Class What it does Contains all the router outlets created in a component. Class Overview class RouterOutletMap { registerOutlet(name: string, outlet: RouterOutlet) : void removeOutlet(name: string) : void } Class Description Class Details registerOutlet(name: string, outlet: RouterOutlet) : void Adds an outlet to this map. removeOutlet(name: string) : void Removes an outlet from this map. exported from @angular/router/index, defined in @angular/router/src/router_outlet_ma

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

wtfLeave

Experimental Const Variable Export export wtfLeave Used to mark end of Scope. scope to end. returnValue (optional) to be passed to the WTF. Returns the `returnValue for easy chaining. exported from @angular/core/index defined in @angular/core/src/profile/profile.ts

DebugElement

Experimental Class Class Overview class DebugElement { constructor(nativeNode: any, parent: any, _debugInfo: RenderDebugInfo) name : string properties : {[key: string]: any} attributes : {[key: string]: string} classes : {[key: string]: boolean} styles : {[key: string]: string} childNodes : DebugNode[] nativeElement : any addChild(child: DebugNode) removeChild(child: DebugNode) insertChildrenAfter(child: DebugNode, newChildren: DebugNode[]) query(predicate: Pred

Response

Experimental Class Class Overview class Response { constructor(responseOptions: ResponseOptions) type : ResponseType ok : boolean url : string status : number statusText : string bytesLoaded : number totalBytes : number headers : Headers toString() : string } Class Description Creates Response instances from provided values. Though this object isn't usually instantiated by end-users, it is the primary object interacted with when it comes time to add data to a view

MaxLengthValidator

Stable Directive Class Overview class MaxLengthValidator { maxlength : string ngOnChanges(changes: SimpleChanges) validate(c: AbstractControl) : {[key: string]: any} registerOnValidatorChange(fn: () => void) } Selectors [maxlength][formControlName] [maxlength][formControl] [maxlength][ngModel] Class Description A directive which installs the MaxLengthValidator for any formControlName,formControl, or control withngModelthat also has amaxlength` attribute. Class Details maxlen