用户点击videoClick
<div ng-repeat="list in lists" ng-click="videoClick(list.src)">
{{list.src}}
</div>
这有效,后续执行。
$scope.videoClick = function(val) {
$log.info('received.');
var modalInstance = $uibModal.open({
size: 'lg',
templateUrl: '/views/video_modal.html',
animation: true,
backdrop: false,
controller: 'VideoController',
resolve: {
videoPath: function() {
return val;
}
}
});
};
现在我想获取'videoPath'的价值,但我收到了错误。
在'VideoController'内部
angular
.module('tss.application')
.controller('VideoController', function(videoPath) {
"use strict";
});
*
知道为什么我无法在'VideoController'中获得'videoPath'的价值吗?
*
答案 0 :(得分:0)
你能试试吗
angular
.module('tss.application')
.controller('VideoController',['videoPath',function(videoPath) {
"use strict";
}]);