Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I am new to angular 5 rather to angular.I have a piece of code for 'file upload' written in angular 1 and I am unable to convert it to angular 5. I am stuck !Need help..

What I have tried:

var files = $scope.files;

var fd = new window.FormData();

       angular.forEach(files, function (value, key) {
           fd.append(key, value);
       });

Please convert above code in angular 5, having issues with angular foreach!!
Posted
Comments
sirshasoffr 30-Jul-18 7:29am    
?
rupai99 31-Jul-18 5:31am    
Faced the same problem...No solution found till date..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900