I\'m getting an error when using Angular Material. Specifically,
ERROR Error: Uncaught (in promise): Error:
StaticInjectorError(AppModule)[CdkConnectedOverlay -&
I was getting the exact same error, due to lazy loaded modules which had the mat-menu
component in them.
What removed the error for me, was including MatDialogModule
and MatMenuModule
in the AppModule
, which isn't lazy-loaded:
import { MatDialogModule } from '@angular/material/dialog';
import { MatMenuModule } from '@angular/material/menu';
Then the error was gone, and the mat-menu
worked again