mbest / knockout

My enhancements to Knockout
35 stars 4 forks source link

label for binding dependencies #16

Closed mbest closed 12 years ago

mbest commented 12 years ago

I've decided that the word 'dependencies' is confusing and am thinking of using 'requires' instead. Thus a binding that has a dependency would be specified like this:

ko.bindingHandlers.custom = {
    requires: 'value',
    update: ....
}

To specify dependencies in the binding string:

value: myValue, custom: someProp, requires: {custom: 'value'}
mbest commented 12 years ago
ko.bindingHandlers.custom = {
    needs: 'value',
    update: ....
}
value: myValue, custom: someProp, needs: {custom: 'value'}