Here is my HTML form:

<form name="myForm" ng-submit="">
    <input ng-model="file" type="file"/>
    <input type="submit" value="Submit"/>
</form>

I want to upload an image from local machine and want to read the content of the uploaded file. All this I want to do using AngularJS.

When I try to print the value of $scope.file it comes as undefined.

29 Answers
29

Leave a Reply

Your email address will not be published. Required fields are marked *