What is difference between $window and window in AngularJS?



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

Post New Answer

More AngularJS Interview Questions

What is a scope in a project?

1 Answers  


What are the different types of directives?

1 Answers  


What is shared module?

1 Answers  


What does angular do?

1 Answers  


What do you understand by metadata in context of angular 2 application?

1 Answers  


Explain what is the injector?

1 Answers  


What is the provider method in angularjs?

1 Answers  


How to apply validation in AngularJS?

1 Answers  


What is react vs angular?

1 Answers  


What is difference between value and constant?

1 Answers  


What is injectors?

1 Answers  


What is data binding in AngularJS?

1 Answers   SLK Software,


Categories