I've the following class
namespace Cancel {
export class View {
controller = new Controller();
test() {
this.controller.pr();
}
}
export const view = new View();
}
I call the test method from a button inside a Telerik KendoUI-Grid row and I get the following error
Cannot read property 'pr' of undefined at init.test
This error is shown because this is not pointing to the class so the question is
How can I access to controller's property in the test method?