I need to create some angular services on the fly. I cannot wrap my head around how to work with DI and the http service. Please help!
import { HttpClient } from '@angular/common/http';
export class BaseService {
constructor(private http: HttpClient) {}
get() {
return this.http.get('/endpoint');
}
}
let service = new BaseService(HttpClient);
// doesn't work :(