I use ngx-material-timepicker timePicker install from here
with command npm install --save ngx-material-timepicker
also i install dependencies luxon and tslib
and according to npm
import {NgxMaterialTimepickerModule} from 'ngx-material-timepicker';
@NgModule({
imports: [NgxMaterialTimepickerModule]
})
and in my html file
<input [ngxTimepicker]="picker">
<ngx-material-timepicker #picker></ngx-material-timepicker>
but error
core.js:15724 ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
at ngx-material-timepicker.js:231
at Module../node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js (ngx-material-timepicker.js:238)
at __webpack_require__ (bootstrap:83)
at Module../src/app/modules/management/admin/admin.module.ts (admin-routing.module.ts:145)
at __webpack_require__ (bootstrap:83)
at $_lazy_route_resource lazy namespace object:34
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
at Object.onInvoke (core.js:17299)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:390)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:150)
at resolvePromise (zone.js:831)
at resolvePromise (zone.js:788)
at zone.js:892
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:17290)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at drainMicroTaskQueue (zone.js:601)
based on github issue and this you can use version 3.3.1 of "ngx-material-timepicker" or if you are using angular 8 you can use version v4.0.0 or go to /node_modules/ngx-material-timepicker/fesm5/ngx-material-timepicker.js
and change the ɵɵdefineInjectable
to defineInjectable
.