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

Angular 1.4.2 nothing happens

Undefitied opened this issue · comments

Nothing happens using:

<youtube-video video-id="sMKoNBRZM1M"></youtube-video>

and using video-url occurs an error

<youtube-video video-url="anotherGoodOne"></youtube-video>

in your first example, use <youtube-video video-id="'sMKoNBRZM1M'"></youtube-video>. note the single quotes around sMKoNBRZM1M. angular will evaluate whatever you put there, and you want it to be evaluated as a string. without the quotes, it will be treated as an undefined variable on $scope.

in the second example, i'm not sure what value you've given anotherGoodOne. define it with a URL that looks like one of these, and it should work. let me know if you find a YouTube link to a video that doesn't work with this directive.

on my local machine, i tried running the demo with v1.4.2, and everything seems to be working!

if you have any more trouble, let me know! i'm gonna close this issue tho, since it looks like the directive is working well with v1.4.2. 🌟