问题描述
为什么会收到Uncaught ReferenceError: Cannot access 'NgxMatCalendar' before initialization
?
我使用shared.module.ts
进行与组件相关的导入和导出,而我的app.module.ts
则导入SharedModule
。但是,我已经导入了接下来的两件事
import { NgxMatDatetimePickerModule,NgxMatTimepickerModule } from 'ngx-mat-datetime-picker';
在我的 NgModule导入中:
NgxMatDatetimePickerModule,NgxMatTimepickerModule,
但是可能出了点问题,我也不知道为什么。
错误提示:
checkout-overview.component.ts:13中的代码行是:
@Input() cartId: string;
edit-event-dialog.component.ts:24中的代码行在其构造函数参数中:
@Inject(MAT_DIALOG_DATA) public data: any,
我不知道为什么会出错。有人可以帮我吗?
解决方法
通过在npm上查找程序包,我发现它已被弃用,它们暗示切换到@ angular-material /...
也许您可以先尝试一下?
编辑:
作者消息:不再支持软件包。请改用@ angular-material-components / datetime-picker,请参阅link