I18nSelectPipe

Experimental Pipe What it does Generic selector that displays the string that matches the current value. How to use expression | i18nSelect:mapping NgModuleCommonModule Description Where: mapping: is an object that indicates the text that should be displayed for different values of the provided expression. Example @Component( {selector: 'i18n-select-pipe', template: `<div>{{gender | i18nSelect: inviteMap}} </div>`}) export class I18nSelectPipeComponent { gender: str

I18nPluralPipe

Experimental Pipe What it does Maps a value to a string that pluralizes the value according to locale rules. How to use expression | i18nPlural:mapping NgModuleCommonModule Description Where: expression is a number. mapping is an object that mimics the ICU format, see http://userguide.icu-project.org/formatparse/messages Example @Component({ selector: 'i18n-plural-pipe', template: `<div>{{ messages.length | i18nPlural: messageMapping }}</div>` }) export class I18nPlu

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

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

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

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

HostListener

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

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

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

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