brandly / angular-youtube-embed

:tv: Embed a YouTube player with a simple directive
http://brandly.github.io/angular-youtube-embed/
MIT License
510 stars 147 forks source link

Not able bind data to video-url tag in ng-repeat #131

Closed iiitmahesh closed 8 years ago

iiitmahesh commented 8 years ago

This not able bind data to video-url tag.

it shows as it was in the console

<div ng-repeat="item in arrayList track by $index">
<youtube-video video-url="'{{item.videoURL}}'" player-width="'100%'" player-height="'250px'"></youtube-video>
</div>
brandly commented 8 years ago

here's an example of video-url inside an ng-repeat: https://github.com/brandly/angular-youtube-embed/issues/35

iiitmahesh commented 8 years ago

this syntax working for me <youtube-video video-url="{{item.youtubeVideos[0].videoURL}}" player-width="'100%'" player-height="'250px'"></youtube-video>

I have replaced above code with below following code

<div ng-repeat="item in listOfData track by $index"> <h4>{{item.youtubeVideos[0].videoHeader}}</h4> <youtube-video video-url="item.youtubeVideos[0].videoURL" player-width="'100%'" player-height="'250px'"></youtube-video>