Typically, my pages make use of custom providers I inject, the providers typically have a few helper functions. I am working on an app where I will insert a number of similar rows into a database, so I plan on using promise.all
Following the many examples, I create an array and then map it into a reference to the function I call which exists in a class instance named myprovider, such as
// inject provider into ctor named myprovider // build array named myarray let maparray:any = Promise.all(myarray.map(this.myprovider.dosomething)); maparray.then ... etc
Works fine ion simple testbeds, except when the app goes to this.myprovider.dosomething, all of the helper functions, class members, etc are undefined. The ctor never fires.
Any good ideas on making members of a class in a referenced function visible?