Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Cannot get "this" from callback

$
0
0

@alexmehler wrote:

Hey guys, im grinding my teeth here lol

i load a json with

readJSON(filename) {

this.file.readAsText(this.file.externalRootDirectory + "xtracker", filename).then(() => this.successCallback, this.failureCallback);

}

but in

successCallback(result) { console.log(this)};

ig get undefined , means i cannot fill the variable for my ngfor list, this.clients

i tried some hacks like ()=> but to no avail

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>