I used the answer in this link nodejs + multer + angularjs for uploading without redirecting for making file uploads in angularjs. This works perfectly.
According to my requirements i edited the code of angular html file (added ng-switch):
<div ng-switch="MyVar">
<div ng-switch-when="car">
<input type="file" file-model="myFile"/>
<button ng-click="uploadFile()">Upload</button>
</div>
<div ng-switch-when="dog">
dog
</div>
</div>
All the other files are exactly same.
ng-switch works correctly.
But after this change my file upload wont work (causes server error because no file gets send). I mean if i remove the switch part as in the link then it works fine.
$scope.myFile shows null even after selecting a file.
Why is ng-switch causing problem?
please help