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
ng It’s better to use less iframes