I\'m fairly new to RequireJS and I\'ve run into a bit of a problem. I\'ve written a little framework built on Backbone using RequireJS and I want it to be re-usable in different
This worked for me, adding a "./"
prefix to the module names:
define(function (require, exports, module) {
exports.createDash = function (dash, element) {
require([ './dash/dash.model', './dash/dash.view' ], function (DashModel, DashView) {
return new DashView({
model : new DashModel(dash),
el : element ? element : window
});
});
};
});