How to extend the initialize method of a view – eg

_.extend(InvoiceDetailsView.prototype, {         

               initialize: _.wrap(InvoiceDetailsView.prototype.initialize, function wrappedInitialize(fn, options) {                      

                fn.apply(this, _.toArray(arguments).slice(1));                    

                 …..        

});}

Leave a comment

Your email address will not be published. Required fields are marked *