import { HttpClient } from '@angular/common/http' ; import { Injectable } from '@angular/core' ; @ Injectable ( ) export class EditUserService { constructor ( private http ) { } public getUser ( id ) { return this . http . get ( `/user/${ id }` ) ; } public updateUser ( data ) { return this . http . put ( `/user/${ data . id }` , data ) ; } }