Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MatDialog Error: No provider for InjectionToken mat-dialog-scroll-strategy

Tags:

By 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

like image 848
Krosan Avatar asked Oct 12 '17 09:10

Krosan


1 Answers

You need to include MatDialog Module in the imports.

import {MatDialogModule} from '@angular/material'; @NgModule({    imports :[MatDialogModule],    ... }) 
like image 187
jmarioste Avatar answered Sep 17 '22 14:09

jmarioste