I am trying to create an upload form in Angular 2 ts (2.2.1), that allows the upload of e.g. a CSV file, but instead of the file being sent straight to a http service I want
Do it like this:
myReader.onloadend = (e) => { console.log(myReader.result); this.fileString = myReader.result; };
So you can access your variables.
For a more detailed explanation: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Functions/Arrow_functions