Guest User

Untitled

a guest
Dec 13th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1.  
  2. (function($) {
  3.  
  4. window.Item = Backbone.Model.extend({});
  5.  
  6. window.ItemView = Backbone.View.extend({
  7.  
  8. initialize: function() {
  9. this.template = Handlebars.compile($("#item-template").html());
  10. },
  11.  
  12. render : function() {
  13. var renderContent = this.template(this.model.toJSON());
  14. console.log(renderContent);
  15. $(this.el).html(renderContent);
  16. return this;
  17. }
  18.  
  19. });
  20. })(jQuery);
Add Comment
Please, Sign In to add comment