generator-base-backbone
Version:
Backbone.js basic skeleton for webapp development. With RequireJS, Bootstrap, Sass, and templating with Pug and Lodash. Also with JSHint and Grunt.
11 lines • 337 B
JavaScript
;
define(['backbone', 'jquery', 'underscore', 'text!../../templates/header.html'], function(Backbone, $, _, HeaderTemplate) {
var HeaderView = Backbone.View.extend({
el: $('#header'),
template: _.template(HeaderTemplate),
render: function() {
this.$el.append(this.template());
}
});
return new HeaderView();
});