Using moment.js in Angular 2 typescript application
问题 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 so far: I installed moment.js using npm, so I can find the library under node_modules/moment/moment.js I configured System.js to retrieve moment library: System.config({ packages: { app: { format: 'register', defaultExtension: 'js' }, moment: { main: 'moment.js', type: 'cjs', defaultExtension: 'js' } }, map: { moment: 'node