Int the following code the file object is printing as undefined why?
Html
<input type="file" name="issueFile" file-model="jsfile">
<a class="btn pull-right" ng-click="create()">Create</a>
controller
$scope.cancel = function () {
var fd = new FormData();
angular.forEach($scope.jsfile,function(file){
fd.append('file',file);
});
fd.append('formdata',JSON.stringify(jsondata));
$http.post('admin/managecuisineAdd',fd,{
transformRequest:angular.identity,
headers:{'Content-type':undefined}
}).success(function(data){
$scope.status=data;
$scope.itemlist.push(data)
$scope.message="New Dish Added Successfully"
});
}