I am currently working on implementing a component that utilizes dynamic dialog and requires a direct usage. In the DynamicDialog example, there is a constructor in the car demo list component.
constructor(private carService: CarService, public ref: DynamicDialogRef, public config: DynamicDialogConfig) { }
However, when I try using <carlist></carlist>,
I encounter an error that reads:
ERROR Error: StaticInjectorError(AppModule)[CarslistdemoComponent -> DynamicDialogRef]: StaticInjectorError(Platform: core)[CarslistdemoComponent -> DynamicDialogRef]: NullInjectorError: No provider for DynamicDialogRef! at NullInjector.push.../node_modules/@angular/core/fesm5/core.js.NullInjector.get
Does anyone have a solution to this issue or any advice on implementing it differently?