I have a page that has links to multiple videos. Video thumbnails are displayed in a list, and when you click on one of them, that video plays in the top, common video player.
If I were doing this in jQuery, I'd have a click event that grabs the video id on a data attribute stored on the link and (re)create the video player with this video id and show the common player, it if it's not already shown.
However, I'm trying to do this the "angular way". One way might be to add a $scope.showVideo click handler that would do all of this.
But it seems like I should perhaps do this in a directive, since DOM manipulation should be done in directives....
So, do I put this directive on the common video player? What, then, might it do?
I'm just looking for a high-level architecture plan to do this if anyone has any ideas.
Thanks.