i want to display a popup containing a youtube video when i click, while displaying a still image normally. I and am completely lost .
I'm new to angular, i would really appreciate any insight !
Here is my js code
'use strict';
function mediaVideoArtistController($scope, $element, $attrs) {
}
var app = angular.module('merciPublicApp').component('mediaVideoArtist', {
templateUrl: 'components/appcomponent/media/mediaVideoArtist/mediaVideoArtist.html',
controller: mediaVideoArtistController
})
app.controller('popupCtrl', function (ngDialog) {
$scope.clickToOpen = function () {
ngDialog.open({ template: '/component/appcomponent/media/mediaYoutube.html' });
};
});
Here is my HTML code
<div ng-controller='popupCtrl' ng-click="clickToOpen()">
<div class="Video">
<iframe title="YouTube video player" class="youtube-player" type="text/html"
width="640" height="390" src="http://www.youtube.com/embed/W-Q7RMpINVo"
frameborder="0" allowFullScreen></iframe>
</div>
<div class="modal fade" id="videoModal" tabindex="-1" role="dialog" >
<div class="modal-dialog">
<div class="modal-content" >
<div class="modal-body" >
<div>
<iframe width="100%" height="350" src=""></iframe>
</div>
</div>
</div>
</div>
</div>
</div>