brandly / angular-youtube-embed

:tv: Embed a YouTube player with a simple directive

Home Page:http://brandly.github.io/angular-youtube-embed/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin throws error when used with ionic {{}}

royken opened this issue · comments

Does not work when using the ionic {{}}. This is my code

<youtube-video video-id="{{campagne.video}}" player-width="'560px'" player-height="'315px'"></youtube-video>

And this is the error i get:
ionic.bundle.js:19890 Error: [$parse:syntax] Syntax Error: Token '{' invalid key at column 2 of the expression [{{campagne.video}}] starting at [{campagne.video}}].

Curly braces are not needed to set the values to the attributes, so you can just type:

<youtube-video video-id="campagne.video" player-width="'560px'" player-height="'315px'"></youtube-video>

Don´t forget to attach the campagne.video to the $scope on the controller.

thanks @AlvaroHerrero! that's exactly right

Thank you !!!