I have a file called moment.js on my local file system and loading it as follows with require.js works:
initialize: function() {
require(['moment'], function(data) {
console.log(data);
});
}
However, if I do:
initialize: function() {
require(['http://momentjs.com/downloads/moment.min.js'], function(data) {
console.log(data);
});
}
data comes back undefined. Why is this? and how do I dynamically include remote modules at runtime?