TypeError: Object(…) is not a function for angular-material

后端 未结 2 1013
北海茫月
北海茫月 2021-01-19 23:49

In angular 7, trying to use angular material mat-dialog-content. While importing in app.module.ts it gives the following error:

TypeError

2条回答
  •  我在风中等你
    2021-01-20 00:09

    Change the dependencies to the lowest version of @angular/core or @angular/cdk. It's normally due to a mismatch

    "dependencies": {
      "@angular/core": "^7.2.0",
      "@angular/cdk": "^7.2.0",
      "@angular/material": "^7.2.0"    
    },
    

提交回复
热议问题