Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Moment.js in CanJS Controller

$
0
0
I have a project that uses Moment.js and if I require moment.js in my main script it works with no problems. But if I require and use moment.js in my CanJS controller, I get error(s) like moment is not a function or object is not a function.

If I include moment.js via a script tag without AMD and use it in my CanJS controller, it works with no problems.

Am I doing something wrong? because moment.js support AMD.

Thank you for your time.


Viewing all articles
Browse latest Browse all 3491

Trending Articles