-
-
Save jrmlstf/5907735 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var TestView = Backbone.View.extend({ | |
el: '#container', | |
initialize: function () { | |
console.log('Inside Init'); | |
this.render = _.wrap(this.render, function(render) { | |
this.beforeRender(); | |
render(); | |
this.afterRender(); | |
}); | |
this.render(); | |
}, | |
render: function () { | |
console.log('Inside render'); | |
return this; | |
}, | |
beforeRender: function () { | |
console.log("Before render"); | |
}, | |
afterRender: function () { | |
console.log("After render"); | |
} | |
}); | |
var testViewInstance = new TestView; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment