我有一个按钮。它应该在按钮点击时充当文件上传。
<div id="Rectangle-541">
<md-icon md-svg-src="./assets/images/csv.svg" class="ic_cloud_download_black_24px"></md-icon>
<md-button class="Upload-CSV-from-mem">Upload .CSV From Memory</md-button>
</div>
答案 0 :(得分:1)
看看这个
*
var jimApp = angular.module("mainApp", []);
jimApp.controller('mainCtrl', function($scope){
$scope.fileChanged = function(){
angular.element('#fileUplaod').trigger('click');
};
$scope.profilePictureSelected = function(data){
console.log(data.files[0]);
};
});