daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var layoutView = new Layout();
  2. var itemView = new ItemView();
  3.  
  4. App.containerRegion.show(layoutView);
  5. layoutView.mainRegion.show(itemView); <---- This is where the issue would occur.
  6.    
  7. render: function(){
  8.     if (this.beforeRender){ this.beforeRender(); }
  9.     this.trigger("before:render", this);
  10.     this.trigger("item:before:render", this);
  11.  
  12.     var data = this.serializeData();
  13.     var templateSrc = this.getTemplate();
  14.     $.ajax({
  15.       url: 'templatesFolder/ + templateSrc,
  16.       success: _bind(function(template){
  17.          var html = Marionette.Renderer.render(template, data);
  18.          this.$el.html(html);
  19.  
  20.          if (this.onRender){ this.onRender(); }
  21.          this.trigger("render", this);
  22.          this.trigger("item:rendered", this);
  23.       }, this)
  24.     })
  25.  
  26.     return this;
  27.   },
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top