Closed ax1 closed 7 years ago
Custom methods now have the implicit this
object assigned to the controller.
Note: the custom functions can be declared either as function() {}
or as arrow () => {}
but the first is preferred for these functions since the arrow assigns the this
in runtime and it could be a different object than the controller.
See controller for examples.
When any method is defined in the controller, the this object is the controller itself ir.controller().myMethod=funct(){//this===controller}
This behavior should be the same for the custom methods that are executed after REST calls, that is, these functions should get the controller as this object (currently, this=>the object containing the customMethods, that is useless)
Possible solutions