I\'m struggling in using moment.js library inside an Angular 2 Typescript app. Even after reading the answer to this question I can\'t get it to work.
This is what I did
Also I found this: Install Moment.js using NPM:
npm install moment
Add it to your SystemJS configuration:
map: {
'angular2': 'node_modules/angular2',
'rxjs': 'node_modules/rxjs',
'moment': 'node_modules/moment/moment'
}
You also need the interface:
tsd install moment --save
and then add:
///
import * as moment from 'moment';