I\'m new to angulajs and I\'m trying to dynamically add image to a column when user selects it. Here is the below code and it did not work. code in .cshtml file ---
For your example, which looks quiet straight forward. I would recommend not to get into any plugin. Check this plukr
$scope.imageUpload = function(event){
var files = event.target.files;
var reader = new FileReader();
reader.onload = $scope.imageIsLoaded;
reader.readAsDataURL(files[0]);
}
$scope.imageIsLoaded = function(e){
$scope.$apply(function() {
$scope.path = e.target.result;
});
}
and in your html
NOTE: : ng-change
is not supported for type file