'Manage fileupload and textbox inside ng-repeat using AngularJS
I am trying to do below code in my application but stuck to implement
I'm figuring out how can I save the values that are entered in textbox and also each uploaded files to controller and service , then I can pass into server. It lets user to save each text box value and coresponding file upload ( row by row). I need to get which file corresponds to which textbox in service
Below is a sample code: I have a form and enabled enctype
.
$scope.items=[1,2,3]
<div ng-repeat="item in items">
<input type="text" ng-model=item[$index]>
<input type ="file" ng-model=item[$index]>
</div>
<button type="button" ng-click="saveAllValues()">Save</button>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|