I have this variable:
public originalData: Array<any> = [];
and this function:
canvas.onclick = function (evt) {
console.log(this.originalData);
}
The function is unable to see this.originalData - how do I go about accessing that and other variable properly within my 'onclick' method? I now I can do this outside of the function:
var dataCopy = this.originalData;
and access it via 'dataCopy', but is there a way to access the variable without creating a new var variable?