I want get the file name from my html input tag in a modal view and save it using Angular2. Can someone help me?
相关问题
- Views base64 encoded blob in HTML with PHP
- Angular RxJS mergeMap types
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
HTML
Script
HTML
Component
You can do next:
HTML:
TypeScript:
This link's https://stackoverflow.com/a/44932086/4281182 solution suggested by @ Selçuk Cihan did not help so my workaround was to make the fileInput param type "any" by doing this
so in TS runtime this is a pure JS code
Anyways thanks for this great ans it saved me a lot of time
You can try a more elegant option:
HTML:
Script:
This work form me:
HTML
TS