Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
//
// #main
//
require.config({
paths: {
jquery: 'libs/jquery/jquery-min',
handlebars: 'libs/handlebars/handlebars',
underscore: 'libs/underscore/underscore-min',
backbone: 'libs/backbone/backbone-optamd3-min',
LayoutManager: 'libs/backbone/backbone-layoutmanager',
text: 'libs/require/text'
}
});
require([
'jquery',
'handlebars',
'underscore',
'backbone',
'LayoutManager'
],
function($, Handlebars, _, Backbone) {
Backbone.LayoutManager.configure({
paths: {
layout: "templates/layouts/",
template: "templates/"
},
fetch: function(path) {
var done = this.async();
$.get(path + ".html", function(contents) {
done(contents);
});
},
render: function(template, context) {
return Handlebars.compile(template)(context);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.