Hi I’m trying to change size of iframe element On Ionic modal.This is my code on controller to calculate screen width and height and then trying to adapt size of iframe container accordingly.
$scope.Math = $window.Math;
$scope.w = $window.innerWidth*9;
$scope.h=$window.innerHeight*16;
$scope.d=$scope.Math.min($scope.w,$scope.h);
if ($scope.d==$scope.w){
$scope.w=$window.innerWidth-10;
$scope.h=$scope.w*9/16;
}
else {
$scope.h=$window.innerHeight-10;
$scope.w=$scope.h*16/9;
}
$scope.widthModal=$scope.w+"px!important";
$scope.heightModal=$scope.h+"px!important";
I’m not able to bind this returned style to iframe element on view template. I tried jQuery lite but it throws some error and doesn’t work. Is there some way to make iframe element resposive by this method?
Could you please have a look @mhartington
Any help would be highly appreciated.
Thank you