用angular 和ui.bootstrap的弹窗做视频播放,关闭弹窗后,视频仍在后台下载。
//js代码
angular.module('courseWorkManage').controller('CourseController',function (courseService,$scope, $uibModal) {
$scope.getCourseList = function (url,params) {
courseService.getCourseList(url,params).then(function (data) {
$scope.courseList = data.courseList;
});
}
$scope.getCourseList('testGetCourseList.do','currentPage=1')
$scope.open = function(size,video) {
var modalInstance = $uibModal.open({
animation: true,
templateUrl: 'ModalClaimCtrl.html',
controller: 'ModalClaimInstanceCtrl',
size: size,
resolve: {
video: function () {
return video;
}
}
});
};
});
angular.module('courseWorkManage').controller('ModalClaimInstanceCtrl',function($scope,$http, $uibModalInstance,$sce, video) {
$scope._video = angular.copy(video);
$scope.trustSrc = function (url) {
return $sce.trustAsResourceUrl(url);
}
$scope.close = function() {
$scope._video = null;
$uibModalInstance.close('close');
};
});
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
欢迎选择我的课程,让我们一起见证您的进步~~