Skip to content

Instantly share code, notes, and snippets.

@joachimhs
Created August 30, 2012 14:27
Show Gist options
  • Save joachimhs/3529609 to your computer and use it in GitHub Desktop.
Save joachimhs/3529609 to your computer and use it in GitHub Desktop.
Ember.js rerender on window resize issue
init: function() {
var view = this;
var resizeHandler = function() {
view.rerender();
};
this.set('resizeHandler', resizeHandler);
$(window).bind('resize', this.get('resizeHandler'));
},
willDestroy: function() {
$(window).unbind('resize', this.get('resizeHandler'));
}
@0xcaff
Copy link

0xcaff commented Aug 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment