How can I handle "resize" event of windows in AngularJS way?

Hi,
How can I handle “resize” event of windows in AngularJS way?

In jQuery, it’s working fine but I want change this code to AngularJS:

Thanks

a) if you have a full-screen layout ( view is created as child of document.body ) you need not use the above code at all, as view will track resize event on its own.

b) you can use something like next http://webix.com/snippet/3b01fff6