I'm converting Angular 9 project into Angular 17 and one component got angular-calendar plugin which was last published an year ago,
in component.html it's implemented like this,
<mwl-calendar-month-view
*ngSwitchCase="CalendarView.Month"
[viewDate]="viewDate"
[events]="events"
[refresh]="refresh"
[activeDayIsOpen]="activeDayIsOpen"
(dayClicked)="dayClicked($event.day)"
(eventClicked)="handleEvent('Clicked', $event.event)"
(eventTimesChanged)="eventTimesChanged($event)">
</mwl-calendar-month-view>
in the component.ts i have imported the modules like following,
],
imports: [
BrowserModule,
AppRoutingModule,
ReactiveFormsModule,
FormsModule,
HttpClientModule,
NgxDropzoneModule,
CalendarModule.forRoot({
provide: DateAdapter,
useFactory: adapterFactory,
}),
],
but still the component didn't get recognized, in component.html. getting errros like this,
NG8002: Can't bind to 'refresh' since it isn't a known property of 'mwl-calendar-day-view'.
1. If 'mwl-calendar-day-view' is an Angular component and it has 'refresh' input, then verify that it is included in the '@Component.imports' of this component.
2. If 'mwl-calendar-day-view' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@Component.schemas' of this component. [plugin angular-compiler]
any idea how to resolve this ?
thanks in advance.
Here is a working example for angular standalone component, we need to import
CalendarModuleto the imports array of the standalone component, also ensure that we add the environment providers usingimportProvidersFromso that the providers are available in the applicationfull code
Stackblitz Demo