i've been going from page to page all over the internet trying to find a simple and recommended way of uploading a single file in angularjs, so far i have found none, what i want is to be able to do something like this:
<input type="file" ng-model="file" id="form.file" />
<input type="text" ng-model="name" id="form.name" />
Then in my controller/service i have a function that posts all my form data:
SomeRandomService.save = function($scope.form) {
return $http
.post('/api/v1/some/random/url/', $scope.form)
};
Is this so difficult in angular? I am a newbie to angular so i can't even understand some of the solutions i have found online.
Is there something way more simpler? A plugin or service or directive that can do this for me?