Trying to upload an image file and process it in an AngularJS function called onFileSelect. However after the Choose File button was clicked the value of $scope.fileMsg inside onFileSelect was not updated. Any tips? Thanks a bunch!
<div ng-app="myApp" ng-controller="myCtrl">
<form name="myForm">
<div>
<input type="file" ngf-select="onFileSelect(file)" name="file">
<span ng-show="fileMsg">{{fileMsg}}</span>
</div>
</form>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
$scope.fileMsg = "Checkpoint 1";
$scope.onFileSelect = function(file) {
$scope.fileMsg = "Checkpoint 2";
}
}
);
</script>