I want to include the ng2-datepicker module in my application. I tried to follow as indicated in the readme file.
npm install ng2-datepicker
modified systemjs.config.js file for:
.map {
'ng2-datepicker': 'npm:ng2-datepicker',
'moment': 'npm:moment/moment.js'
}
'ng2-datepicker': {
format: 'register',
defaultExtension: 'js'
}
The following line has been added to index.html:
<script src="node_modules/moment/moment.js"></script>
added the following line to app.module.ts
import { DatePicker } from 'ng2-datepicker/ng2-datepicker';
declarations: [ AppComponent ,
DatePicker]
When loading the application, the following error appears:
Error: ReferenceError: require is not defined
at eval (http:
at eval (http:
at ZoneDelegate.invoke (http:
Evaluating http:
Error loading http:
source
share