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 a scope in a project?
What are the different types of directives?
What is shared module?
What does angular do?
What do you understand by metadata in context of angular 2 application?
Explain what is the injector?
What is the provider method in angularjs?
How to apply validation in AngularJS?
What is react vs angular?
What is difference between value and constant?
What is injectors?
What is data binding in AngularJS?