I am trying dynamically create a component using the NgbModal from the ng-bootstrap library (which I believe uses the ComponentFactoryResolver method underneath) but am running into an issue when I try to provide HttpClient into the Static Injector.
Has anyone run into this issue and know what to do? Thanks in advance for the help!
EDIT: The code where I create the new component.
let modal: NgbModalRef =
this.modalService.open(HoursApprovalModalComponent, {
injector: Injector.create( [
{provide: FormBuilder, useClass: FormBuilder, deps: []},
{ provide: AttendanceService, useClass: AttendanceService, deps: [HttpClient]},
{ provide: HttpClient, useClass: HttpClient, deps: []},
// { provide: HttpHandler, useClass: HttpHandler, deps: [] },
] ),
size: 'lg'
});