angular iframe 加载失效解决办法已经自适应高度

<iframe frameborder="0" id="iframe1"></iframe>
$('#iframe1').attr('src', 'www.baidu.com');
document.getElementById("iframe1").contentDocument.location.reload();

 自适应高度:

 var ifm = document.getElementById(iframe);
            ifm.height = 100;
            var subWeb = document.frames ? document.frames[iframe].document : ifm.contentDocument;
            if (ifm != null && subWeb != null) {
                ifm.height = subWeb.body.scrollHeight;
            }
原文地址:https://www.cnblogs.com/jasonlai2016/p/11340996.html