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

后端 未结 7 1324
清酒与你
清酒与你 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:03

    These issue arise generally due to mismatch between @ngx-translate/core version and Angular .Before installing check compatible version of corresponding ngx_trnalsate/Core, @ngx-translate/http-loader and Angular at https://www.npmjs.com/package/@ngx-translate/core

    Eg: For Angular 6.X versions,

    npm install @ngx-translate/core@10 @ngx-translate/http-loader@3 rxjs --save
    

    Like as above, follow below command and rest of code part is common for all versions(Note: Version can obtain from( https://www.npmjs.com/package/@ngx-translate/core)

    npm install @ngx-translate/core@version @ngx-translate/http-loader@version rxjs --save
    

提交回复
热议问题