What is difference between $window and window in AngularJS?
Answer Posted / 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 View All Answers
How to access the angular $scope variable in browsers console?
How does lazy load work?
What is cli in angular 2?
What does the ng stand for in angular?
Difference between constructor and ngoninit?
What is fxflex in angular?
Explain how e2e testing of angularjs applications works?
What is issue with two-way data binding?
How to apply validation in AngularJS?
How to display the values in tables in AngularJS?
How to update angular 4,5, 6 to angular 7?
Why is ngoninit called twice?
What is @inject()?
Differentiate between angular and angularjs.
What is the aot compilation?