angular.js - angularJs uses iframe, the problem of web page content adaptation
怪我咯
怪我咯 2017-05-15 17:09:06
0
1
526

As shown above, this page (/wx_app/#/doraemo) is a mobile carousel. Clicking on the corresponding page will jump to another page (/wx_app/#/banner). Use the iframe tag on the banner page. Yes, the src link is a cross-domain link. The problem now is: 1. If I directly use a hyperlink to jump to the carousel page, the page width and height will be adaptively scaled proportionally, but it is not what I want. 2. I use routing to jump

The second way is as shown above. The width and height are not automatically scaled. The src links are all PC links. The html page is as follows:

<iframe ng-src="{{banner}}" frameborder="0" width="100%" height="100%"></iframe>//html
 $scope.banner = $sce.trustAsResourceUrl(localStorage.getItem('bannerUrl'))//js代码

I want to use the second method, but how should the width and height be scaled proportionally? In addition, if $sce.trustAsResourceUrl() is not used in the js code, an error will be reported. I used iframe to link source files and it was displayed normally

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
洪涛

ng It’s better to use less iframes

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template