angular material 出現ERROR

我根據這個網站去試angular material時,它出現以下這個錯誤。
https://ithelp.ithome.com.tw/articles/10192517

Uncaught TypeError: Class constructor Platform cannot be invoked without ‘new’
at Module…/node_modules/@angular/cdk/ivy_ngcc/fesm2015/platform.js (platform.js:78)
at webpack_require (bootstrap:79)
at Module…/node_modules/@angular/cdk/ivy_ngcc/fesm2015/a11y.js (a11y.js:1)
at webpack_require (bootstrap:79)
at Module…/node_modules/@angular/material/ivy_ngcc/fesm2015/core.js (core.js:1)
at webpack_require (bootstrap:79)
at Module…/node_modules/@angular/material/ivy_ngcc/fesm2015/button.js (button.js:1)
at webpack_require (bootstrap:79)
at Module…/src/app/app.component.ts (app.component.ts:1)
at webpack_require (bootstrap:79)

網上有些有講過,需要在tconfig.json,加入一些設定,就能夠解決,我試過不能。請問大定知道怎樣解決?
THANK YOU VERY MUCH.

現在新安裝 angular material 的方式變簡單了,請執行下面的指令

ng add @angular/material

官方安裝說明文件: https://material.angular.io/guide/getting-started

1個讚