Guest User

Untitled

a guest
Jul 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import { Http, Response } from '@angular/http';
  2. import {Injectable} from '@angular/core';
  3. import {Observable} from "rxjs";
  4. import {User} from "./models/user.model";
  5.  
  6.  
  7. @Injectable
  8. export class UsersService{
  9.  
  10. constructor(private http: Http){
  11.  
  12. }
  13.  
  14. getUserByEmail(email: string): Observable<User>{
  15. return this.http.get('http//localhost:3000/users?mail=${{email}}')
  16. .map((response: Response) => response.json());
  17. }
  18. }
Add Comment
Please, Sign In to add comment