I have used 'Angular-Moment-Picker' for implementig date Picker with Angular1.6 and facing console error 'Moment is not defined' after importing required Module.
Official website for Angular-Moment-Picker: https://indrimuska.github.io/angular-moment-picker/
Error:
I have added module as per below. 1. I have installed 'Angular-Moment-picker' and Moment using NPM iNSTALL. 2. included both modules in app.module.js file.
import momentPicker from 'angular-moment-picker';
import * as moment from 'moment/min/moment-with-locales';
Also,
const app = angular
.module('app', [
...
moment,
momentPicker,
...
])...
Now, I am facing this error in console.
Also, I have also tried adding few things inside 'webpack-config.js' file but there is no luck on it.
new webpack.ProvidePlugin({
moment: 'moment',
}),
Not only that, I have also tried many things but still no luck.
It would be great, if some can help me on it.
Thanks in advance...