What is difference between $window and window in AngularJS?
Answer / chaitanya
$window is an Angular service which reference to the browser's window object. The window object is globally available in JavaScript; it causes testability problems, because it is a global variable. Angular refer to it through the $window service, so that it can be overridden, removed or mocked for testing.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is providers in angular?
What is databind?
What is lazy loading in angular 2?
What are directives in angular 6?
What is isolated scope in angularjs?
What is angular6?
Is angularjs a factory singleton?
What is a class in angular?
If both factory and service are equivalent, then when should I use them?
What are angular expressions?
What is schema in angular?
What is splice method?