Reputation: 65
I am using angularjs,my problem is after upload file the file name is still on brows button.i want delete filename after upload a file,after upload a file (upload complete) i want to show no file selected.
this is my example. Fiddle
Upvotes: 0
Views: 1887
Reputation: 23816
You fiddle Demo having errors
Angular library not included
ng-app="myApp"
Consider following code its working as you want:
var myApp = angular.module('myApp', []);
myApp.controller('myCtrl', function($scope) {
$scope.upload = function(){
alert('Removing file');
$scope.myFile = "";
};
});
Upvotes: 1
Reputation: 378
Write this css for that.
input[type="file"]{
width:90px; /*reduce input width*/
color: transparent /*text will be there but not visible*/
}
or
input[type="file"]{
color: transparent; /*text will be there but not visible*/
}
Upvotes: 0