Reputation: 3826
So I compiled .Jade to .js. How would I use a .js template in backbone.js with require.js? Ive tried something like this:
define(['marionette'],
function(Marionette) {
return CoreNorthLayout = Backbone.Marionette.Layout.extend({
template: require('/to/folder/templatename')
});
});
But no work, anything else I can try? Thanks.
Upvotes: 0
Views: 345
Reputation: 146154
Jade is going to generate just a single javascript function source code: function anonymous(locals){...}
. You need to wrap this with an AMD wrapper to use it with requirejs.
Upvotes: 1