resolveForwardRef()

Experimental Function Class Export export resolveForwardRef(type: any) : any Lazily retrieves the reference value from a forwardRef. Acts as the identity function when given a non-forward-ref value. Example (live demo) let ref = forwardRef(() => 'refValue'); expect(resolveForwardRef(ref)).toEqual('refValue'); expect(resolveForwardRef('regularValue')).toEqual('regularValue'); See: forwardRef exported from @angular/core/index defined in @angular/core/src/di/forward_ref.ts

ResolvedReflectiveProvider

Experimental Interface Interface Overview interface ResolvedReflectiveProvider { key : ReflectiveKey resolvedFactories : ResolvedReflectiveFactory[] multiProvider : boolean } Interface Description An internal resolved representation of a Provider used by the Injector. It is usually created automatically by Injector.resolveAndCreate. It can be created manually, as follows: Example (live demo) var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]); var in

ResolvedReflectiveFactory

Experimental Class Class Overview class ResolvedReflectiveFactory { constructor(factory: Function, dependencies: ReflectiveDependency[]) factory : Function dependencies : ReflectiveDependency[] } Class Description An internal resolved representation of a factory function created by resolving Provider. Constructor constructor(factory: Function, dependencies: ReflectiveDependency[]) Class Details factory : Function Factory function which can return an instance of an object re

ResolveData

Stable Type-alias What it does Represents the resolved data associated with a particular route. See Routes for more details. Interface Overview interface ResolveData { } Interface Description exported from @angular/router/index, defined in @angular/router/src/config.ts

Resolve

Stable Interface What it does Indicates that class can implement to be a data provider. How to use class Backend { fetchTeam(id: string) { return 'someTeam'; } } @Injectable() class TeamResolver implements Resolve<Team> { constructor(private backend: Backend) {} resolve( route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Observable<any>|Promise<any>|any { return this.backend.fetchTeam(route.params.id); } } @NgModule({ imports: [

resetFakeAsyncZone()

Experimental Function Class Export export resetFakeAsyncZone() Clears out the shared fake async zone for a test. To be called in a global beforeEach. exported from @angular/core/testing/index defined in @angular/core/testing/fake_async.ts

RequiredValidator

Stable Directive Class Overview class RequiredValidator { required : boolean validate(c: AbstractControl) : {[key: string]: any} registerOnValidatorChange(fn: () => void) } Selectors [required][formControlName] [required][formControl] [required][ngModel] Class Description A Directive that adds the required validator to any controls marked with the required attribute, via the NG_VALIDATORS binding. Example <input name="fullName" ngModel required> Class Details required :

RequestOptionsArgs

Experimental Interface Interface Overview interface RequestOptionsArgs { url : string method : string|RequestMethod search : string|URLSearchParams headers : Headers body : any withCredentials : boolean responseType : ResponseContentType } Interface Description Interface for options to construct a RequestOptions, based on RequestInit from the Fetch spec. Interface Details url : string method : string|RequestMethod search : string|URLSearchParams headers : Headers body :

RequestOptions

Experimental Class Class Overview class RequestOptions { constructor({method, headers, body, url, search, withCredentials, responseType}?: RequestOptionsArgs) method : RequestMethod|string headers : Headers body : any url : string search : URLSearchParams withCredentials : boolean responseType : ResponseContentType merge(options?: RequestOptionsArgs) : RequestOptions } Class Description Creates a request options object to be optionally provided when instantia

RequestMethod

Experimental Enum Class Overview class RequestMethod { Get Post Put Delete Options Head Patch } Class Description Class Details Get Post Put Delete Options Head Patch exported from @angular/http/index, defined in @angular/http/src/enums.ts