rniemeyer / knockout-classBindingProvider

An alternate binding provider for Knockout that allows you to define your bindings in a JavaScript object and key into it from the markup.
MIT License
101 stars 27 forks source link

Added the ability to override the default "class" virtualAttribute. #10

Closed mberkom closed 12 years ago

mberkom commented 12 years ago

You should be able to set the virtualAttribute to something different by passing in the options with it defined. It wraps whatever you pass in with "ko ...:".

// you can now do this

var bindings = { ... };

ko.bindingProvider.instance = new ko.classBindingProvider(bindings, {
  "attribute": "data-ext-bind",
  "virtualAttribute": "ext-bind"
});
rniemeyer commented 12 years ago

Thanks. Merged along with specs/docs.