gpt4 book ai didi

angular5 - 角度 5 Material MatTableDataSource

转载 作者:行者123 更新时间:2023-12-04 03:08:12 27 4
gpt4 key购买 nike

我从角度 4.4.6 和 Material beta 19 更新到角度 5 和 Material 5.0.0-rc0

应用程序编译正确,但我在 Chrome 上执行

"Uncaught Error: Unexpected value 'MatTable DataSource' imported by the module 'Material Modules'. Please add a @NgModule annotation."

其他 Material 组件工作正常,mat-icon,mat-card-content,mat-tab-group,mat-dialog-xxx ...

你能帮帮我吗?

最佳答案

MatTableDataSourceMatTable已经在MatTableModule中,所以不需要在@NgModule中再次导入。

从您的共享 -> 导入中删除 MatTableDataSource

仅将其导入您的组件中,作为 import { MatTableDataSource} from @angular/material

关于angular5 - 角度 5 Material MatTableDataSource,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47204805/

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