isDevMode()

Experimental Function Class Export export isDevMode() : boolean Returns whether Angular is in development mode. After called once, the value is locked and won't change any more. By default, this is true, unless a user calls enableProdMode before calling this. exported from @angular/core/index defined in @angular/core/src/application_ref.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

http

Module Entry point for all public APIs of the http package. BaseRequestOptions BaseResponseOptions BrowserXhr Connection ConnectionBackend CookieXSRFStrategy Headers Http HttpModule JSONPBackend JSONPConnection Jsonp JsonpModule QueryEncoder ReadyState Request RequestMethod RequestOptions RequestOptionsArgs Response ResponseContentType ResponseOptions ResponseOptionsArgs ResponseType URLSearchParams XHRBackend XHRConnection XSRFStrategy defined in @angular/http/index.ts

HTTP Client

Talk to a remote server with an HTTP Client. HTTP is the primary protocol for browser/server communication. The WebSocket protocol is another important communication technology; we won't cover it in this chapter. Modern browsers support two HTTP-based APIs: XMLHttpRequest (XHR) and JSONP. A few browsers also support Fetch. The Angular HTTP library simplifies application programming of the XHR and JSONP APIs as we'll learn in this chapter covering: HTTP client sample overview Fetch data with

HttpModule

Experimental Class Class Overview class HttpModule { } Class Description The module that includes http's providers Annotations @NgModule({ providers: [ // TODO(pascal): use factory type annotations once supported in DI // issue: https://github.com/angular/angular/issues/3183 {provide: Http, useFactory: httpFactory, deps: [XHRBackend, RequestOptions]}, BrowserXhr, {provide: RequestOptions, useClass: BaseRequestOptions}, {provide: ResponseOptions, useClass: BaseRe

Hierarchical Injectors

Angular's hierarchical dependency injection system supports nested injectors in parallel with the component tree. We learned the basics of Angular Dependency injection in the Dependency Injection chapter. Angular has a Hierarchical Dependency Injection system. There is actually a tree of injectors that parallel an application's component tree. We can reconfigure the injectors at any level of that component tree with interesting and useful results. In this chapter we explore these points and wri

Http

Experimental Class Class Overview class Http { constructor(_backend: ConnectionBackend, _defaultOptions: RequestOptions) request(url: string|Request, options?: RequestOptionsArgs) : Observable<Response> get(url: string, options?: RequestOptionsArgs) : Observable<Response> post(url: string, body: any, options?: RequestOptionsArgs) : Observable<Response> put(url: string, body: any, options?: RequestOptionsArgs) : Observable<Response> delete(url: string

HashLocationStrategy

Stable Class Class Overview class HashLocationStrategy { constructor(_platformLocation: PlatformLocation, _baseHref?: string) onPopState(fn: LocationChangeListener) : void getBaseHref() : string path(includeHash?: boolean) : string prepareExternalUrl(internal: string) : string pushState(state: any, title: string, path: string, queryParams: string) replaceState(state: any, title: string, path: string, queryParams: string) forward() : void back() : void } Class Descri

HostBinding

Stable Interface Interface Overview interface HostBinding { hostPropertyName : string } Interface Description HostBinding decorator and metadata. Interface Details hostPropertyName : string exported from @angular/core/index, defined in @angular/core/src/metadata/directives.ts

Headers

Experimental Class Class Overview class Headers { staticfromResponseHeaderString(headersString: string) : Headers constructor(headers?: Headers|{[key: string]: any}) append(name: string, value: string) : void delete(name: string) : void forEach(fn: (values: string[], name: string, headers: Map<string, string[]>) => void) : void get(header: string) : string has(header: string) : boolean keys() : string[] set(header: string, value: string|string[]) : void val