0

I'm trying to create a tag for a Youtube embed video where the src comes from a variable value of a database

The tag goes like this:

<iframe class="img-fluid w-100" width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

and I'm trying to substitute it like this:

<iframe class="img-fluid w-100" width="560" height="315" src="{{frontPageConfig.recentVideos2.linkURL}}"
            frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

But it does not work with or without {{variable}}.

Thanks.

Jorge M. Nures
  • 680
  • 1
  • 14
  • 30

1 Answers1

1

You will probably need to sanitize the URL as is done in

Correct way Provide DomSanitizer to Component with Angular 2 RC6

Though you can find somre problems with the versions:

@angular/platform-browser/platform-browser"' has no exported member 'HammerLoader'

Mike
  • 1,059
  • 5
  • 28
  • 51