I am shooting a video from a playlist with the YouTube v3 API. Each JSON video object has a videoId. I am trying to use videoId to assemble the src attribute in an img element using Angular.
This is what I have:
<table id="playlistvideostable" class="table table-responsive table-striped"> <thead> <tr> <th>Name</th> <th>Thumbnail</th> </tr> </thead> <tbody> <tr ng-repeat="video in playlistvideos"> <td> {{video.snippet.title}} </td> <td> <img src="http://img.youtube.com/vi/{{video.resourceId.videoId}}/hqdefault.jpg" alt="Video Thumbnail" class="img-responsive"/> </td> </tr> </tbody> </table>
How can I concatenate the following lines in the src attribute of an img html element?
" http://img.youtube.com/vi/ " + video.resourceId.videoId + "/hqdefault.jpg"
source share