filePhotoValue: any = "xexe";
sendFile(file) {
var reader = new FileReader();
reader.onload = function (e:any) {
console.log(this.filePhotoValue);
};
}
Warum filePhotoValue innerhalb reader.onload Konsolen "undefined"
statt xexe
? Es gibt keine Kompilierungsfehler und ich möchte einen Wert auf filePhotoValue inside
reader.onload setzen.Typoskript Variable innerhalb file.onload ist