0

I try to set up an iframe with src to youtube. The url inside an iframe is invisivble, when you inspect element in the browser. The same url pasted outside the iframe works perfectly.

<iframe width="420" height="315" ng-src="{{getChangeYouTubeLink(companyDetails.youTubeLink)}}"></iframe><br>
{{getChangeYouTubeLink(companyDetails.youTubeLink)}}

you see this when you inspect element

Do you have idea why it happens?

igor
  • 51
  • 1
  • 5
  • the problem is $sce, which is a protection from XSS, and that the link needs to be added to the whitelist. You can use $sce for this. – Ved Sep 29 '17 at 06:51
  • have a look: https://stackoverflow.com/questions/24163152/angularjs-ng-src-inside-of-iframe – Ved Sep 29 '17 at 06:54
  • Thank you, that was exactly the case! – igor Sep 29 '17 at 10:25

0 Answers0