I'm new to angularjs and I stumbled upon this angular component of the $ window service. While trying to figure it out I have this snippet
<div ng-app="miniapp" ng-controller="AppController">
</div>
Js
var demoFunction =(function(){
var app = angular.module('miniapp', []);
app.controller("AppController",['$scope','$window',function($scope,$window){
alert($window.outerWidth);
}]);
}())
jsfiddle
But surprisingly, I see different values in Chrome and Mozilla, even if the window has the same aspect ratio.

source
share