0

Not sure it is an error or config issue..

I have ngrx effect which has a dependency to MatDialog (whenever a success action happens in the effects, all the dialog should get closed ), When I inject in in the construction like

  constructor(
private actions$: Actions,
private dialog: MatDialog,
private categoryService: CategoryService 

) {}

It shows the error

NullInjectorError: No provider for MatDialog!

I think this pattern worked before standalone angular, where we could import MatDialogModue to the child feature module and which would provide the dialog. But when switched to standalone, it all got messed up.

Not sure if it is an error or any other way to provide the effects or store other than.

  provideState(CATEGORY_FEATURE_KEY, categoryReducer),
  provideEffects(CategoryEffects),

in the routes providers array..

Please help, I am stuck at this problem..

Jay
  • 336
  • 1
  • 4
  • 15

0 Answers0