2017.06.18

learning list

  • Angular: http.request .subscribe
import { Http, Request, Response } from '@angular/forms';

@Component({...});
export class ComponentName {
  constructor(private http: Http) {
    // 1. request
    this.http.request(URL)
      .subscribe((res: Response) => {
        // 2. handler response
        return ;
      })
  }
}

// 2. Reservable.fromEvent(el.native.element, event)
        .map(cb)
        .filter(cb)
        .do(cb)

results matching ""

    No results matching ""