Window event handling in ember


#1

is there any standard way for event handling in ember, to resize a div manually depend on window.resize function ?

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'));
}

other than this


#2

Bump.

It would be cool to have the resize: action in components, as we have click:, mouseMove:, dragStart: etc.


#3

Check out the ember-resize add on.