<iframe id="myFrame" ng-src="{{url}}" width="100%" height="100%" seamless frameborder="0" ></iframe>
打开不同域的内容时报下面的错误:
Blocked loading resource from url not allowed by $sceDelegate policy
app.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
// Allow same origin resource loads.
‘self‘,
// Allow loading from our assets domain. Notice the difference between * and **.
‘http://media.w3.org/**‘]);
});
[参考]:
http://stackoverflow.com/questions/21884666/angular-js-handling-ng-repeated-html5-video-sce
时间: 2024-10-14 04:25:06