Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Backbone.View.prototype.template = _.memoize(function(id){
- var element = document.getElementById(id);
- if (element)
- return _.template(element.innerHTML);
- else
- throw new Error('Could not find template '+id);
- });
Add Comment
Please, Sign In to add comment