SHARE
TWEET

Untitled

a guest Oct 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Injectable } from '@angular/core';
  2. import { HttpClient } from '@angular/common/http';
  3. import { AuthData } from './auth-data.model';
  4.  
  5. @Injectable({ providedIn: 'root'})
  6. export class AuthService {
  7.   constructor(private http: HttpClient) {}
  8.   createUser(email: string, password: string)  {
  9.     const authData: AuthData = {email, password};
  10.     this.http.post('http://localhost:3000/api/user/signup/', authData)
  11.     .subscribe(response => {
  12.       console.log(response);
  13.     })
  14.   }
  15. }
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