rather than using jQuery to get the window width, angular allows you to define directives to access to the dom. see https://github.com/getlantern/www.getlantern.org/blob/master/app/scripts/directives/videoOnClick.js#L30 for an example.