ionic-content 中iframe高度自適應

http://blog.csdn.net/jesounao/article/details/50945003
沒法訪問外部url的問題–兩個步驟解決:
1.iframe的src屬性用ng-src屬性替代,並指明綁定對象:ng-src="{{targetUrl}}"html

2.在controller裏,調用$sce: $scope.targetUrl = $sce.trustAsResourceUrl(url)ui

高度沒法最大化的問題–兩個步驟:
1.ion-content 屬性裏添加 scroll="true" overflow-scroll="true"url

2.iframe的style裏添加 min-height: 100%.net

<ion-modal-view>
    <ion-header-bar>
        <h1 class="title">沒法登陸</h1>
        <div class="buttons">
            <button class="button" ng-click="closeModal()">取消</button>
        </div>
    </ion-header-bar>
    <ion-content scroll="true" overflow-scroll="true">
        <iframe src="http://www.zehuiwenhua.com/guoxue/content.html?k=guoxue-content-cannot-login" frameborder="0" style="width:100%;height:100%;"></iframe>
    </ion-content>
</ion-modal-view>
相關文章
相關標籤/搜索