$scope.openAttachment = function(id) {
var w = window.innerWidth;
var h = window.innerHeight;
$window.open(' ~/Controller/Actionresult?docId='+id, '_blank', 'left=' + w / 5 + ',top=' + h / 5 + ',width=' + (w / 5) * 3 + ',height=' + (h / 4) * 3 + ',toolbar=1,resizable=1');
}