gpt4 book ai didi

javascript - TypeError : core. defineInjectable 在 Angular 4.3.2 中使用 Angular Material /cdk 时不是函数

转载 作者:太空狗 更新时间:2023-10-29 18:18:41 24 4
gpt4 key购买 nike

我想使用 Angular Material 进度微调器并添加

import {MatProgressSpinnerModule} from '@angular/material';

添加到导入数组和组件中

还没有尝试过使用选择器更新模板和删除它。在任何一种情况下都会出现错误。

我正在使用 system.config.js,并为所有 Angular Material 和 cdk js 文件添加了贴图值。

使用 Angular 4.3.2 和 Angular Material 最新版本。出现以下错误。

errors.ts:42 ERROR Error: Uncaught (in promise): Error: TypeError: core.defineInjectable is not a function at eval (http://localhost:8000/node_modules/@angular/cdk/bundles/cdk-bidi.umd.js:89:62) at Object.eval (http://localhost:8000/node_modules/@angular/cdk/bundles/cdk-bidi.umd.js:91:2) Error loading http://localhost:8000/app/UMSClient/com/ipc/ums/modules/EnterpriseTree/Enterprise.module.js at eval (http://localhost:8000/node_modules/@angular/cdk/bundles/cdk-bidi.umd.js:89:62) at Object.eval (http://localhost:8000/node_modules/@angular/cdk/bundles/cdk-bidi.umd.js:91:2) Error loading http://localhost:8000/app/UMSClient/com/ipc/ums/modules/EnterpriseTree/Enterprise.module.js

有什么问题吗?

谢谢,

最佳答案

defineInjectable 是一个只有 angular 6 的函数。您可能一直在使用最新版本的 Angular Material,它与您当前的版本 (4.3.2) 不兼容。

关于javascript - TypeError : core. defineInjectable 在 Angular 4.3.2 中使用 Angular Material /cdk 时不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50491610/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com