gmac / backbone.epoxy

Declarative data binding and computed models for Backbone
http://epoxyjs.org
MIT License
615 stars 89 forks source link

Unable to bind to view.$el using the bindings hash #30

Closed markerikson closed 11 years ago

markerikson commented 11 years ago

If the bindings hash approach is used, Epoxy finds the elements to bind to using the selectors specified as the keys for the bindings hash. Unfortunately, jQuery has no individual selector that will target the current element. As a result, while binding to the view's $el can be done using the HTML attribute approach, it can't be done using the bindings hash.

Backbone.Stickit implements this by doing a special-case check for a ":el" pseudo-element. Shouldn't be too hard to do something similar.

gmac commented 11 years ago

Good point. Let's mark this as a ToDo...

gmac commented 11 years ago

Added in commit 536e08d.