安装角度材料并将 app.module.ts 中的角度材料导入添加到项目后,我遇到了错误,并且到目前为止所有解决方案都不起作用。我的角度为 14,节点为 16。第一个错误,实际上要长得多:
\nError: node_modules/@angular/cdk/a11y/index.d.ts:152:18 - error TS2707: Generic type '\xc9\xb5\xc9\xb5DirectiveDeclaration' requires between 6 and 8 type arguments.\n\n152 static \xc9\xb5dir: i0.\xc9\xb5\xc9\xb5DirectiveDeclaration<CdkAriaLive, "[cdkAriaLive]", ["cdkAriaLive"], { "politeness": "cdkAriaLive"; "duration": "cdkAriaLiveDuration"; }, {}, never, never, false, never>;\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\nError: node_modules/@angular/cdk/a11y/index.d.ts:175:18 - error TS2707: Generic type '\xc9\xb5\xc9\xb5DirectiveDeclaration' requires between 6 and 8 type arguments.\n\n175 static \xc9\xb5dir: i0.\xc9\xb5\xc9\xb5DirectiveDeclaration<CdkMonitorFocus, "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", ["cdkMonitorFocus"], {}, { "cdkFocusChange": "cdkFocusChange"; }, never, never, false, never>;\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\nError: node_modules/@angular/cdk/a11y/index.d.ts:208:18 - error TS2707: Generic type '\xc9\xb5\xc9\xb5DirectiveDeclaration' requires between 6 and 8 …Run Code Online (Sandbox Code Playgroud)