Another solution is to authorise the URL in your trusted resources
App.config(function($sceDelegateProvider, apiUrl) {
$sceDelegateProvider.resourceUrlWhitelist([
'self',
"http://www.youtube.com/embed/**"
];
});
http://docs.angularjs.org/api/ng/provider/$sceDelegateProvider
Le mercredi 21 août 2013 20:22:12 UTC+7, Alexander Kohout a écrit :
>
> Until Angular 1.1.5 I used the following code to display a Youtube video
> via an iFrame:
>
> <iframe style="width:100%" ng-src="{{movie.trailer}}" frameborder=0
> allowfullscreen>
>
>
> Since 1.2.0 this breaks with the following error message:
>
> Error: [$interpolate:interr] Can't interpolate: {{ movie.trailer }}
>
> Error: [$sce:insecurl] Blocked loading resource from url not allowed by
> $sceDelegate policy. URL: ...
>
>
> It seems to have something to do with $sce, but I can't really understand
> what's going on there. Can anybody help me out? Thanks in advance!
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.