2017-08-11 6 views

答えて

0

これを試してください。

<div> 
     <input type="file" ([ngModel])="file" accept="application/pdf" (change)="fileChange($event)"> 
    </div> 



    public fileChange(fileInput: any){ 
      if (fileInput.target.files && fileInput.target.files[0]) {     
       console.log(fileInput.target.files && fileInput.target.files[0]); 
      } 
    } 
関連する問題