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 are templates?
Write the cli command to generate a component in angular 4?
How can primeng be used with angular2?
What is $q service and when to use it?
Explain the reasons that compel a web developer to choose angularjs for his web development project?
What is routing in javascript?
How to open and close modal popup using typescript and bootstrap?
What is aot build?
How can someone set, get, and clear cookies in angularjs?
What does injectable mean?
What is the difference between a unit and end-to-end (e2e) test in angularjs?
Explain module in AngularJS?