我正在尝试使用角度材料库。我在 package.json 中添加了 @angular/material 的依赖项,如下所示
"@angular/animations": "^5.0.0",
"@angular/cdk": "^6.0.0",
"@angular/material": "^5.2.5",
当我使用
import { MatTabChangeEvent } from '@angular/material';
它在编译时抛出错误
ERROR in [at-loader] ./node_modules/@angular/material/stepper/typings/stepper.d.ts:28:5
TS2416: Property '_stepHeader' in type 'MatStepper' is not assignable to the same property in base type 'CdkStepper'.
Type 'QueryList<ElementRef>' is not assignable to type 'QueryList<FocusableOption>'.
Type 'ElementRef' is not assignable to type 'FocusableOption'.
Property 'focus' is missing in type 'ElementRef'.
除了导入行之外,我没有添加任何与角度材料相关的代码。