error TS1086: An accessor cannot be declared in an ambient context in Angular 9

后端 未结 7 1322
清酒与你
清酒与你 2021-02-03 18:14

I\'m learning Angular Material and I\'m getting this error when importing { MatButtonModule } from \"@angular/material/button\".

From what I read in other answers, it lo

7条回答
  •  遥遥无期
    2021-02-03 19:00

    First please check in module.ts file that in @NgModule all properties are only one time. If any of are more than one time then also this error come. Because I had also occur this error but in module.ts file entryComponents property were two time that's why I was getting this error. I resolved this error by removing one time entryComponents from @NgModule. So, I recommend that first you check it properly.

提交回复
热议问题