integrate to-function
timoxley opened this issue · comments
Can't recall if we've had this discussion before, but if component/to-function
was used to evaluate Binding.prototype.value, it would be possible to do stuff using expressions like:
<a href="#" data-hide="users.length < 10">More</a>
Could put this in the options/fns object passed to reactive. How do you trigger a change for an expression? I don't know. Perhaps some kind of loop ala angular (#26, #31).
This will conflict with "computed properties" syntax, but I'm not really sure what's going on there. Ugh this is probably a bad idea I guess.
hmmm maybe! Will have to try it out
implementing #45 should play a role in this. I'll try and maintain BC so data-hide="private"
etc should still work, but for complex expressions interpolation: data-hide="{users.length < 10}"
. I have a utility that checks the "complexity" of an expression so we might be able to get away with leaving off the {
/ }
chars anyway