angular - Cannot add moment.js or ng2-bootstrap to angular2 project -
i message when gulp tslint task runs. i'm not sure how add moment.js ng2-bootstrap happy.
node_modules/ng2-bootstrap/components/datepicker/date-formatter.ts(1,25): error ts2307: cannot find module 'moment'.
here project on github. should work visual studio 2015 no additional configuration.
i updated systemjs config specified:
system.config({ packages: { app: { format: 'register', defaultextension: 'js' } }, map: { moment: '../lib/moment/min/moment.min.js' } }); system.import('app.js') .then(null, console.error.bind(console));
i added import components file. generates error.
import {button_directives} 'ng2-bootstrap/ng2-bootstrap';
i'm loading module npm.
"moment": "^2.11.2",
i'm copying library files wwwroot within gulp file. maybe need copy on more files? don't know.
i able make typescript transpiler happy adding few things.
typings install moment --save
then made reference in ts file. ///
i've checked in changes can see @ github link in original question.
Comments
Post a Comment