是app内打开; 我启动了一个view显示外链,如果地址类似:http://www.qq.com/,那么ios和android都是正常的;但是地址是类似:
http://t.cn/RutuOWy(这是http://maka.im自己制作的,复制的分享链接)浏览器就会报错:
报错:
The Content Security Policy directive 'script-src' contains 'object-src' as a source expression. Did you mean 'script-src ...; object-src...' (note the semicolon)?
The source list for Content Security Policy directive 'script-src' contains an invalid source: ''none''. It will be ignored. Note that 'none' has no effect unless it is the only expression in the source list.
关于html部分:
<iframe [src]="iframe" frameborder="0" width="100%" height="100%"></iframe>
关于ts部分:
let oLink="http://t.cn/RutuOWy";
this.iframe = this.sanitizer.bypassSecurityTrustResourceUrl(oLink);