Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sandplate2.applicationView = Backbone.View.extend({
- el: 'div',
- template: _.template($("appl.ejs").html()),
- initialize: function(){
- console.log("Application view initialize");
- _.bindAll(this, "render");
- this.render();
- },
- render: function(){
- console.log("Application view rendering");
- this.$el.html(this.template());
- return this;
- }
- });
- Backbone.LayoutManager.configure({
- manage: true,
- paths: {
- layout: "templates/layouts/",
- template: "templates/"
- },
- fetch: function(path) {
- path = path + ".html";
- if (!JST[path]) {
- $.ajax({ url: app.root + path, async: false }).then(function(contents) {
- JST[path] = Handlebars.compile(contents);
- });
- }
- return JST[path];
- }
- });
Add Comment
Please, Sign In to add comment