Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement