I am very new to angularjs. I wasn't able to find the solution online. I would like to read the text from a file. I was trying to follow this example. FileReader not loading file properly using AngularJS
However, since I'm using TypeScript, I receive this error for this line
document.getElementById('fileInput').files[0];
Error: Property 'files' does not exist on type 'HTMLElement'.
Please suggest me how I can cast to use the files.