Error in Angular 4
Closed this issue · 5 comments
It doesn't work in angular 4... Any idea why?
ERROR in Error: A2Edatetimepicker is not an NgModule
at _getNgModuleMetadata (/home/walter/Smartmeter/SMP_Frontend/node_modules/@angular/compiler-cli/src/ngtools_impl.js:140:15)
at _extractLazyRoutesFromStaticModule (/home/walter/Smartmeter/SMP_Frontend/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
at /home/walter/Smartmeter/SMP_Frontend/node_modules/@angular/compiler-cli/src/ngtools_impl.js:129:27
at Array.reduce (native)
at _extractLazyRoutesFromStaticModule (/home/walter/Smartmeter/SMP_Frontend/node_modules/@angular/compiler-cli/src/ngtools_impl.js:128:10)
at Object.listLazyRoutesOfModule (/home/walter/Smartmeter/SMP_Frontend/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/home/walter/Smartmeter/SMP_Frontend/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
at AotPlugin._getLazyRoutesFromNgtools (/home/walter/Smartmeter/SMP_Frontend/node_modules/@ngtools/webpack/src/plugin.js:207:44)
at _donePromise.Promise.resolve.then.then.then.then.then (/home/walter/Smartmeter/SMP_Frontend/node_modules/@ngtools/webpack/src/plugin.js:443:24)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
same for me too,
I changed path in app.module to 'import {A2Edatetimepicker} from "ng2-eonasdan-datetimepicker/src/datetimepicker.module";' but later had issue with 'SimpleChanges' and removed this type data from /node_modules/ng2-eonasdan-datetimepicker/src/datetimepicker.directive.ts -> ngOnChanges
@XardoniK did it work afterwards?
Unfortunately no. I installed original jquery-datetimepicker plugin(npm) by this author, jquery and moment.js and still had error in console that datetimepicker is not a function. I did some changes in directive.ts but without success.
I think you need add original to index.html. Ehh it's really good datetimepicker but wrapper for angular sucks.