Bharath Peggem

Bharath Peggem

  • 1.2k
  • 584
  • 35.3k

File upload issue in Angularjs,Html using State managements

Sep 7 2017 3:39 AM
Hi,
 
Please help me out, when i'm trying to upload image in upload function in angularjs with html page. see the below code
  1. <input type="file" name="file" id="RequestAttachment" onchange="angular.element(this).scope().SelectedFileUpload(this.files)" />  
above code working fine first image first-time upload, then I will upload again the first image to second image upload, second-time image not getting. it's through an error like
 
Uncaught TypeError: angular.element(...).scope(...).SelectedFileUpload is not a function
HTMLInputElement.onchange
 
I'm using state managements also ui-routing.
 
Thanks,
Bharath peggem

Answers (2)