我正在尝试使 plupload 在由 ng-dialog 生成的模态窗口中工作。代码是:
$scope.showManager = function(){
ngDialog.open({
template: '/template/fmanager.html',
controller: 'FileManagerController'
});
}
app.controller('FileManagerController', function($scope){
$scope.plupload = new plupload.Uploader({
browse_button: 'browseFileButton',
url: '/upload/path',
init: {
FilesAdded: function(uploader, files) {
uploader.start();
}
}
});
$scope.plupload.init();
});
浏览按钮不起作用。我试图创建 init 函数,但没有成功。
$scope.init = function(){
$scope.plupload.settings.browse_button = 'browseFileButton';
$scope.plupload.refresh();
$scope.plupload.init();
}
请,任何建议。