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 |
Explain angular elements?
What are services in angular?
What is angular 4?
What is modules in angular?
What is directive role?
how to set a custom header on the request?
What is the use of @viewchild?
Difference between angular 2, 4, 5, 6, &7?
What are events in angularjs?
Explain what directives are? Mention some of the most commonly used directives in angularjs application?
What is angular testing? What are isolated unit tests? What are angular testing utilities?
What is the difference between lazy loading and eager loading in angular 2?