import { Injectable } from '@angular/core' ; import { HttpClient } from '@angular/common/http' ; import { User } from '../models/user' ; import { backendUrl } from '../constants' ; @ Injectable ( ) export class UserService { constructor ( private http ) { } register ( user ) { return this . http . post ( backendUrl . authService . register , user ) as any ; } }