daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Jul 22nd, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
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
 
Top