-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moment is not a function DateFormatter #252
Comments
known issue, will be fixed in terms of #324 |
I got it working by changing the first line of date-formatter.ts from |
Have the same issue when import DatepickerModule, "ng2-bootstrap": "^1.1.5", moment: 2.15.0, project was generated by angular-cli 1.0.0-beta.14, angular 2.0.0 angular-cli.json (that`s all configuration)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, Iḿ having a lot of trouble with moment js, I have already installed moment js as a dependency and installed the typings too (ambient and dev).
My code works fine (I'm not using the datepicker component), but sadly I get the next error:
TypeError: moment is not a function at DateFormatter.format
I've already read and follow the instructions in the main page and also in:
http://stackoverflow.com/questions/35166168/how-to-use-moment-js-library-in-angular-2-typescript-app
my system.js config look like this :
System.config({
transpiler: 'typescript',
typescriptOptions: { emitDecoratorMetadata: true },
packages: {
"app": {
"defaultExtension": "ts"
},
"node_modules/ng2-bootstrap": {
"defaultExtension": "ts"
},
},
map: {
moment: 'node_modules/moment/moment.js'
},
paths: {
"ng2-bootstrap/ng2-bootstrap": "node_modules/ng2-bootstrap/ng2-bootstrap"
}
});
can you help me ?
The text was updated successfully, but these errors were encountered: