$window provides a shortcut to
access the browsers window object’s in AngularJS,
using $window we can access the
properties and events of the browser’s window object.
The following is the syntax to access $window property using AngularJS
$window.<windows property/event>
The following example shows how to get the browser window’s width and height properties using $window
The following is the syntax to access $window property using AngularJS
$window.<windows property/event>
The following example shows how to get the browser window’s width and height properties using $window