Closed amakhrov closed 8 years ago
Just out of curiosity, could we also support a context declared in the binding itself? Presumably that would have priority over a global option, which in turn continues to have priority over the default function calling context.
Actually with es2015 arrow functions it no longer seems to be a valuable feature :)
If a particular View needs some specific formatting for Model data, it can be done with
converter
parameter of a binding. However, this converter is not bound to the view, which makes it harder to define the converted as a View method (a workaround is to call_.bind
or_.bindAll
on it).This PR offers an alternative and (hopefully) more elegant solution for that - specifying the context as a modelBinder option.