0
我有一個角度指令,用加載微調器在模型窗口上單獨顯示PDF報告。問題是iframe onload未在觸發邊緣瀏覽器。基本上我需要隱藏我的微調,一旦PDF加載在iframe上。我只有邊緣問題,休息所有瀏覽器(IE11,FF,Chrome,Safari)其工作正常。iframe onload不是用邊緣瀏覽器觸發的
這是我的指令。
app.module('app.layout')
.directive('pdfReport', function() {
return {
restrict: 'E',
scope: {
iframesrc: '='
},
controller: function($scope) {
$scope.showSpinner = false;
console.log($scope.showSpinner);
$scope.$watch("iframesrc", function(newValue) {
if (newValue) {
$scope.showSpinner = true;
console.log($scope.showSpinner);
}
});
$('#reportIframe').on('load', function() {
$scope.showSpinner = false;
$scope.$apply();
console.log($scope.showSpinner);
});
},
template: '<div pdf-report-loader show-loader="showSpinner" ngplus-overlay-delay-in="30" ngplus-overlay-delay-out="30" ngplus-overlay-animation="dissolve-animation">' +
'<div class="model-spinner"></div>' +
'</div>' +
'<iframe id="reportIframe" ng-src="{{iframesrc}}" style="width: 100%; height: 500px;border: solid 1px white;">' +
'</iframe>'
}
});