ShankyTiwari / ng-material-multilevel-menu

:page_facing_up: Material Multi-Level Menu for Angular Projects
http://plugins.codershood.info/#/plugins/ngmm-plugin
MIT License
98 stars 55 forks source link

Do I need to provide MutliLevelMenuService #165

Closed otatar closed 1 year ago

otatar commented 3 years ago

Do I need to provide MutliLevelMenuService? I don't use it explicitly anywhere. I use ng-material-multilevel-menu inside lazy loaded module, and this is the error:

core.js:5967 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(DashboardModule)[MultilevelMenuService -> MultilevelMenuService -> MultilevelMenuService -> MultilevelMenuService]: NullInjectorError: No provider for MultilevelMenuService! NullInjectorError: R3InjectorError(DashboardModule)[MultilevelMenuService -> MultilevelMenuService -> MultilevelMenuService -> MultilevelMenuService]: NullInjectorError: No provider for MultilevelMenuService!

ghost commented 3 years ago

Add MultilevelMenuService to NgModule.providers array.

nielcleo commented 3 years ago

Hi @otatar,

To resolve this issue you need to import MultilevelMenuService as well. and add it on your providers.

ShankyTiwari commented 1 year ago

Hope @otatar , you were able to fix that issue, thanks