Why do I get an Uncaught ReferenceError: Cannot access 'NgxMatCalendar' before initialization
?
I use a shared.module.ts
where I use imports and exports related to me components, and I have my app.module.ts
where I import the SharedModule
. However, I have imported the next two thing
import { NgxMatDatetimePickerModule, NgxMatTimepickerModule } from 'ngx-mat-datetime-picker';
And in my NgModule imports:
NgxMatDatetimePickerModule,
NgxMatTimepickerModule,
But probably something goes wrong and I don't know why.
The errors says:
The codeline in checkout-overview.component.ts:13 is:
@Input() cartId: string;
The codeline in edit-event-dialog.component.ts:24 is in its constructor parameter:
@Inject(MAT_DIALOG_DATA) public data: any,
I have no clue why this goes wrong. Can anyone help me with this?
By looking up the package on npm I found out this is deprecated and they imply switching to @angular-material/...
Maybe you can try that first?
edit:
Author message: Package no longer supported. Use @angular-material-components/datetime-picker instead, see link