angular - Primeng日历模块angular 9

标签 angular primeng angular9 angular-upgrade primeng-calendar

我用 Angular 9,primeng 9

我有我的模块:ItemModule :

import { CalendarModule } from 'primeng/calendar';

@NgModule({
    imports: [
       CalendarModule
       .....
    ],
    .....
})

但我得到错误:
ERROR in node_modules/primeng/components/calendar/calendar.d.ts:246:22 - error NG6002:  
Appears in the NgModule.imports of ItemModule, but could not be resolved to an NgModule class.

This likely means that the library (primeng/calendar) which declares CalendarModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. 
Check if a newer version of the library is available, and update if so. 
Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

246 export declare class CalendarModule {

我在那里看到文档,这个版本的primeng应该与angular 9 ivy兼容。

你对此有什么想法吗?提前谢谢。

最佳答案

在 tsconfig.json 中添加:

"angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true,
    **"enableIvy": false**
}

关于angular - Primeng日历模块angular 9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60865334/

相关文章:

css - 更改 primeng 日历中时间选择器的样式

express - SSR(Express)Angular 9 - Uncaught ReferenceError : $localize is not defined

angular - 难以使用 Angular 9 更新 minimist

angular - 组件未加载 *ngIf 中的变量更改

c# - Angular 循环没有正确迭代

javascript - 如何在对话框窗口上放置确认对话框?

Angular 2 PrimeNG Scheduler onDrop事件获取日期

Angular CanDeactivate Guard : How to wait for the right or the next value of an Obersavble?

angular - 如何在Ag-grid中使排序键不敏感?

angular-cli 构建产品 "Runtime compiler is not loaded”