Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify bindings in view *and* in DOM (via data-bind attribute) #144

Open
computrav opened this issue Feb 2, 2017 · 0 comments
Open

Specify bindings in view *and* in DOM (via data-bind attribute) #144

computrav opened this issue Feb 2, 2017 · 0 comments

Comments

@computrav
Copy link

Currently, it appears that you can specify bindings using an object (hash) in the view , OR you can specify them via the DOM using the "data-bind" attribute on DOM elements (or, this can be customized by passing a string for the "bindings" attribute in the view.

What I'm wondering/requesting is to support BOTH -- i.e., provide a hash but still support data-bind via the DOM. This would require some implied precedence of course, in the event a binding for the same element were specified in both the DOM and View (I would think the View should get precedence). Being able to specify the attribute to use (by default, "data-bind") would ideally still be possible - perhaps move that option to a different attribute when defining the view?

Alternatively, is there some other manual workaround for supporting this in my app?

The use case here is that sometimes the more complex things are better-managed in the view, but the simple ones are suitable for placement in the DOM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant