"导出 'ɵɵinject' 未在 '@angular/core' 中找到 [英] "export 'ɵɵinject' was not found in '@angular/core'

查看:35
本文介绍了"导出 'ɵɵinject' 未在 '@angular/core' 中找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在我的 angular 应用程序中使用 MatToolBar 时出现此错误.在浏览器中,我收到 Uncaught TypeError: Object(...) is not a function 并在控制台中收到警告:

I am getting this error when i tried to use MatToolBar in my angular app. In browser I get Uncaught TypeError: Object(...) is not a function and also get warnings in the console:

WARNING in ./node_modules/@angular/cdk/esm5/text-field.es5.js 146:151-159
"export 'ɵɵinject' was not found in '@angular/core'

WARNING in ./node_modules/@angular/cdk/esm5/a11y.es5.js 2324:206-214
"export 'ɵɵinject' was not found in '@angular/core'

我该如何解决这个问题?在 github 上这是一个封闭的问题.

How can I resolve this? On github it is a closed issue.

推荐答案

我已经解决了,我只是将 angular material 的依赖更新为 7,将 angular 版本的依赖更新为 7.3.2 并且有效.

I have resolved it, I just updated the dependency of angular material to 7 and angular version to 7.3.2 and it worked.

这篇关于"导出 'ɵɵinject' 未在 '@angular/core' 中找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆