Reputation: 23
ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(MyModule)[NgbModalRef -> NgbModalRef -> NgbModalRef -> NgbModalRef -> NgbModalRef]: NullInjectorError: No provider for NgbModalRef!
Note1:I have imported and Injected NgbModalRef and NgbModal in my component and tried using NgbModule in my appModule and it didnt Work! Note2:I saw somewhere that people say to write NgbModalRef in appModule provider,and i dont think its the right way because its not a Service!! Can anyone please help..
Upvotes: 2
Views: 2811
Reputation: 584
i solved this problem using this reference.
https://github.com/ng-bootstrap/ng-bootstrap/issues/1832#issuecomment-331798666
from private modalReference: NgbModalRef;
to private modalReference: any;
Upvotes: 0