Closed BorisMoore closed 8 years ago
I have decided not to make the this pointer the view in the case <input data-link="~util.fullName()" />
- since normal expectations would be that the this pointer is the object util
. If access to the view is required, one suggested best-practice would be to add a #view
parameter.
For example if you currently have: <input data-link="~util.fullName(reverse)" />
, you can instead write <input data-link="~util.fullName(reverse, #view)" />
- and then
$.views.helpers("util", {fullName: function fullName(reverse, view) {
// this pointer is ~util
}});
(However, there will still not be an immediate access to view
in the setter).
Won't fix
See discussion: https://github.com/BorisMoore/jsviews/issues/100#issuecomment-144892503
<input data-link="~fullName()" />
But note that:
<input data-link="~util.fullName()" />