driftyco/ng-cordova — pull request #184 by rbecheras (2014-08-28 10:16:26+00:00)
Title: Injected $window in all the services that use the `window` global object...

Injected $window in all the services that need it, for replacing the reference to window global object.

$window is a reference to the browser's window object. While window is globally available in JavaScript, it causes testability problems, because it is a global variable. In angular we always refer to it through the $window service, so it may be overridden, removed or mocked for testing.