Created
June 23, 2017 17:04
-
-
Save AlexanderKozhevin/f4527564661d35bbac392e7a9e1f747e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Http, Response } from '@angular/http'; | |
import 'rxjs/add/operator/map'; | |
@Injectable() | |
export class UserService { | |
constructor ( | |
private http: Http | |
) {} | |
getUser() { | |
return this.http.get(`https://conduit.productionready.io/api/profiles/eric`) | |
.map((res:Response) => res.json()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment