Angularjs Examples

AJS Examples


AngularJS $window Service

The AngularJS $window is similar to JavaScript window object. In angular it is refer to it through the $window service. In the JavaScript, window is a global object which includes many built-in methods like alert(), prompt() etc. The $window service in AngularJS is a wrapper around window object, so that it will be easy to override, remove or mocked for testing.

Syntax

AngularJS $window Service