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

Events hash like Backbone #1458

Closed
victorwpbastos opened this issue Nov 10, 2014 · 4 comments
Closed

Events hash like Backbone #1458

victorwpbastos opened this issue Nov 10, 2014 · 4 comments

Comments

@victorwpbastos
Copy link

Is there a way to configure events like Backbone does? Example:

events: {
    'click .btn-save': 'funcName'
}
@martypdx
Copy link
Contributor

On the TODO list, couldn't find the github issue offhand.

@guilhermeaiolfi
Copy link
Contributor

That would be really nice.

@fskreuz
Copy link
Contributor

fskreuz commented Dec 7, 2014

Been waiting for this. This is similar to how Meteor does their event management. I suppose this comes with delegation? Like we can target DOM elements that are appended/rendered dynamically including content that isn't defined in the template (like HTML in the data rendered in {{{ }}})?

events : {
  'click ul > li > a' : function(){
    // runs also on dynamically appended `li a`
  }
}

Btw, Ractive is the closest framework to Meteor minus the hard dependency of a backend. We could learn a thing or two there.

@guilhermeaiolfi
Copy link
Contributor

I think the related issue is this one: #360

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

No branches or pull requests

5 participants