发布于 2年前

Angular Material报错:Module '"./node_modules/@angular/cdk/cdk"' has no exported member 'CdkTableModule'.

按照官方的文档导入CdkTableModule:

import {CdkTableModule} from '@angular/cdk';

编译包没有导出CdkTableModule的错误:

ERROR :Module '"./node_modules/@angular/cdk/cdk"' has no exported member 'CdkTableModule'.

Angular CDK:2.0.0-beta.12

解决方法

官方文档没有更新,模块CdkTableModule现已迁移到@angular/cdk/table,修改如下:

import {CdkTableModule} from '@angular/cdk/table';
©2020 edoou.com   京ICP备16001874号-3