Closed alexswan10k closed 9 years ago
As described in the documentation, you'd use ko.punches.textFilter.enableForBinding('someCustomBinding')
or ko.punches.textFilter.enableForBinding(ko.bindingHandlers.someCustomBinding)
.
Thanks, I went over this a few times and it didn't occur to me it was what i wanted. Apologies. I think I dismissed it because applying a function off a binding that is totally unrelated to the binding I wished to target seemed counter intuitive.
Are you saying that the documentation is confusing or the API? Can you elaborate?
The API.
I am using
ko.bindings.someCustomBinding
with the filter ko.punches.someCustomFilter
, and it seems a little odd that i would have to go through ko.punches.textFilter
(totally unrelated filter) to hook this binding up.
I understand there are perhaps implementation reasons for this, but I guess I would have expected something closer to ko.punches.enableForBinding(binding)
?
Thanks for the extra details. I'll see if I can make the documentation more clear.
Much appreciated. Thanks.
So I know I can do:
but what I really want to do is:
where data is an array of a known thing, or other complex object. It looks like currently the punches syntax is only supported for text and css.
Is this possible?