Skip to content

Commit

Permalink
Add the Mustache Template
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Jul 19, 2014
1 parent 4bd4898 commit 62fbdaf
Show file tree
Hide file tree
Showing 8 changed files with 2,561 additions and 5 deletions.
20 changes: 20 additions & 0 deletions HomeView.js
@@ -0,0 +1,20 @@
define([
'jquery',
'underscore',
'mustache',
'text!/index.html'
], function($, _, Mustache, indexTemplate) {

var HomeView = Backbone.View.extend({
el: $('#aboutArea'),

render: function() {
var data = {
project: "My Sample Project"
};
this.$el.html(Mustache.to_html(indexTemplate, data));
}
});

return HomeView;
});
4 changes: 2 additions & 2 deletions app.js
@@ -1,6 +1,6 @@
define(['jquery', 'underscore'], function($, _) {
define(['jquery', 'underscore', 'router'], function($, _, Router) {
var initialize = function() {
console.log("init test");
Router.initialize();
};

return {
Expand Down

0 comments on commit 62fbdaf

Please sign in to comment.