filePhotoValue: any = "xexe";
sendFile(file) {
var reader = new FileReader();
reader.onload = function (e:any) {
console.log(this.filePhotoValue);
};
}
Why filePhotoValue inside reader.onload consoles "undefined" instead of xexe? There is no compilation errors and I'd like to set some value to filePhotoValue inside reader.onload.