Skip to content

fix(stateDirective): using on to attach an event handler instead of bind #3036

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

Merged
merged 1 commit into from
Sep 26, 2016

Conversation

navarroaxel
Copy link

fix #3035

@nateabele
Copy link
Contributor

This is a BC-break. We can add support for on and off, but not by dropping support for bind/unbind.

@navarroaxel
Copy link
Author

navarroaxel commented Sep 25, 2016

Yes @nateabele, it's a breaker.
How do you like the IF?

element.bind ? element.bind("click", hookFn) : element.on("click", hookFn);

or this:

element.[element.bind ? 'bind' : 'on']("click", hookFn);

Should I try to use on before bind or viceversa?

@christopherthielen
Copy link
Contributor

I think I merged a similar commit into master

@christopherthielen
Copy link
Contributor

@navarroaxel we would want to try on before bind

@navarroaxel
Copy link
Author

Hey @christopherthielen, are you saying this commit is useless because it was covered by another one?

@navarroaxel
Copy link
Author

Hey @nateabele, I have change the code to be keep the BC.

@christopherthielen
Copy link
Contributor

I think I merged a similar commit on master, not legacy

@christopherthielen christopherthielen merged commit a8aa40a into angular-ui:legacy Sep 26, 2016
@christopherthielen christopherthielen added this to the 0.3.2 milestone Sep 26, 2016
@christopherthielen
Copy link
Contributor

Thanks!

@nateabele
Copy link
Contributor

Yup, thanks @navarroaxel.

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

Successfully merging this pull request may close these issues.

3 participants