我安装了 @Angular/Material 和 @Angular/cdk 来创建模态叠加。但是,当我在 app.module.ts 中导入 OverlayModule 时,它给出了以下错误:
\nError: ./node_modules/@angular/cdk/fesm2015/overlay.mjs 3222:40-54\nCan't import the named export 'ApplicationRef' from non EcmaScript module (only default export is available)\n\nError: ./node_modules/@angular/cdk/fesm2015/overlay.mjs 3240:11-38\nCan't import the named export 'ComponentFactoryResolver' from non EcmaScript module (only default export is available)\n\nError: ./node_modules/@angular/cdk/fesm2015/overlay.mjs 3280:12-39\nCan't import the named export 'ComponentFactoryResolver' from non EcmaScript module (only default export is available)\n\nError: ./node_modules/@angular/cdk/fesm2015/overlay.mjs 410:11-19\nCan't import the named export 'DOCUMENT' from non EcmaScript module (only default export is available)\n\nError: ./node_modules/@angular/cdk/fesm2015/overlay.mjs 443:15-23\nCan't import the named …Run Code Online (Sandbox Code Playgroud)