use AngularJS version of $window

This makes unit testing easier as it can be mocked out easier
Merge pull request #2 from eddiemonge/patch-1

use AngularJS version of $window