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 |
Is angular a ui framework?
What does this line do? @Hostbinding(‘[class.valid]’) is valid?
What is angular libraries?
Can we set an angular variable from php session variable without sending an http request?
What is @injectable providedin root?
What is injector in angular?
Tell me which browsers does Angular work with?
What is a template in angular 2?
What is constant?
What is dependency injection (di)? Why use?
What is router outlet in angular?
Explain .config() and .run() methods in angularjs?