iframe具有src但未加载正文

时间:2019-11-11 12:27:22

标签: html angularjs iframe

我正在创建iframe以便打印来自Azure Blob存储的PDF。该PDF已正确加载,但是由于任何原因,它具有src属性,但没有body属性:

<iframe class="pdf-viewer" ng-if="f.isIframeable"
        src="https://docs.google.com/viewer?embedded=true&url=httpsmypdfurl.pdf">
    #document
    <head></head>
    <body></body>
</iframe>

iframe的原始代码:

<iframe class="pdf-viewer" ng-if="f.isIframeable" src="{{f.url | srcViewer}}">
</iframe>

即使我的src是正确的,为什么还会发生这种情况?我该如何尝试重新加载它或确保其正常工作?

0 个答案:

没有答案