Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Http, Response } from '@angular/http';
- import {Injectable} from '@angular/core';
- import {Observable} from "rxjs";
- import {User} from "./models/user.model";
- @Injectable
- export class UsersService{
- constructor(private http: Http){
- }
- getUserByEmail(email: string): Observable<User>{
- return this.http.get('http//localhost:3000/users?mail=${{email}}')
- .map((response: Response) => response.json());
- }
- }
Add Comment
Please, Sign In to add comment