I want get the file name from my html input tag in a modal view and save it using Angular2. Can someone help me?
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
fileEvent(fileInput){
let file = fileInput.target.files[0];
let fileName = file.name;
}
so in TS runtime this is a pure JS code
Anyways thanks for this great ans it saved me a lot of time