Reputation: 365
In my Angular 15.2.4 project ngx-material-timepicker is not working.
It's imported in my app.module.ts:
`import { NgxMatTimepickerModule } from 'ngx-mat-timepicker';
@NgModule({
imports: [NgxMatTimepickerModule]
})
my component.html
<mat-form-field appearance="fill">
<mat-label>TIMEPICKER</mat-label>
<input matInput [ngxMatTimepicker]="picker" />
<ngx-mat-timepicker #picker></ngx-mat-timepicker>
</mat-form-field>
It's showing this error:
'ngx-mat-timepicker' is not a known element (used in the 'Component' component template):
- If 'ngx-mat-timepicker' is an Angular component, then verify that it is a part of an @NgModule where this component is declared.
- If 'ngx-mat-timepicker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. v
Upvotes: 0
Views: 1969
Reputation: 154
You will have to import it into each module that uses the picker.
Upvotes: 0