cobuild-angular-stack
Version:
Base stack angular sass jade gulp
44 lines (38 loc) • 1.5 kB
JavaScript
(function(){
angular.module('uniko.statics')
.controller('VideoController', VideoController);
VideoController.$inject = ['$scope', '$uibModal'];
function VideoController ($scope, $uibModal){
$scope.showVideo = function (routeTemplate) {
console.log('video, video!');
var modalInstance = $uibModal.open({
animation: true,
templateUrl: routeTemplate,
windowTemplateUrl:'partials/video.modal.html',
size: 'lg',
controller: ['$scope', '$uibModalInstance', 'url', 'Socialshare', '$translate', function ($scope, $uibModalInstance, url, Socialshare, $translate) {
$scope.url = url;
$scope.copied = false;
$scope.$watch('copied', function (newVal) {
if (newVal) {
$scope.copied = false;
$uibModalInstance.close();
}
});
$scope.cancel = function () {
$uibModalInstance.dismiss('cancel');
};
}],
resolve: {
url: function () {
return $scope.url;
}
}
});
modalInstance.result
.then(function (result) {
console.log('open', result);
});
};
}
})();