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 write increment counter in angular js?
Compare Httpmodule vs httpclientmodule?
What is dependency injection (di)? Why use?
What are angular observables?
Which version you are using js?
What is data binding in angular?
Is angular asynchronous?
What are the life cycle hooks order in angularjs?
What methods $resource service object support?
What is art compilation?
What is router and its types?
What is buffer (window storage)?
What is isolated scope in angularjs?
What is a class in angular?
What is a template angular?