Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. //have the choose a pdf document from their local drive
  2. <html>
  3. <input type="file" ng-model="theInputFile"/>
  4. <button ng-click="submit()"> Submit </button>
  5. </html>
  6.  
  7. //pass the document to a c# function for parsing
  8. <script>
  9. $scope.submit = function(){
  10. $http.post('Home/GetVendorInfo',
  11. { "c#Input": $scope.theInputFile})
  12. .success(function (response) {
  13. console.log("send successtul");
  14. });
  15. </script>
  16.  
  17. var app = angular.module("app", []);
  18. app.controller("uploadController", ["$scope",
  19. function($scope) {
  20. $scope.submit = function(){
  21. $http.post('Home/GetVendorInfo',
  22. { "c#Input": $scope.theInputFile})
  23. .success(function (response) {
  24. console.log("send succestul");
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement