问题
at including Provider: MatDialog in the Constructur
constructor(groupService: GroupService, public dialog: MatDialog)
I get following error at runtime
Error: No provider for InjectionToken mat-dialog-scroll-strategy!
I have included the Matdialog in the "app.module.ts" Do i need a different Provider for it and which one? I use angular-material 2.0.0b12
thanks
回答1:
You need to include MatDialog Module in the imports.
import {MatDialogModule} from '@angular/material';
@NgModule({
imports :[MatDialogModule],
...
})
来源:https://stackoverflow.com/questions/46706533/matdialog-error-no-provider-for-injectiontoken-mat-dialog-scroll-strategy