'use strict'; /** * @ngdoc object * @name ng.$window * * @description * 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. * * All expressions are evaluated with respect to current scope so they don't * suffer from window globality. * * @example
it('should display the greeting in the input box', function() { input('greeting').enter('Hello, E2E Tests'); // If we click the button it will block the test runner // element(':button').click(); });
*/ function $WindowProvider(){ this.$get = valueFn(window); }