SHARE
TWEET

Untitled

a guest Jan 11th, 2016 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "use strict";
  2. import {Settings} from "./Settings";
  3.  
  4. export class Fetcher {
  5.   private url: String;
  6.   private http;
  7.  
  8.   constructor(http) {
  9.     this.http = http;
  10.     this.url = Settings.url;
  11.     this.fetchJson();
  12.     debugger;
  13.   }
  14.  
  15.   fetchJson() {
  16.     this.http.get(this.url)
  17.     .map(res => res.text())
  18.         .subscribe(
  19.           data => data,
  20.           err => console.log(err),
  21.           () => console.log("Completed request.")
  22.         );
  23.   }
  24.  
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top