Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Conversation

@filipkis
Copy link

Currently if you specify an expression that's not just a reference to a function such as ui-sortable-update=doSomething() you have no way of accessing the event and ui arguments passed to callbacks.

With this PR I've made those two arguments available as $event and $ui parameters in the scope of the expression execution. So now you could do ui-sortable-update=doSomething($event, $ui) or even ui-sortable-update=doSomething($event, $ui.item.sortable).

Bringing up to date with the head fork
Attribute expression callbacks now also have access to the event and ui arguments. For example you could specify ui-sortable-update="myCallback($event, $ui)".
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 5adae58 on filipkis:attribute-arguments into e763b57 on angular-ui:master.

@filipkis
Copy link
Author

P.S. I've originally tried to submit this PR as #557, but had trouble with jshint (there's a post commit hook that messes up the quotes), that's why I created a new one to have a cleaner history.

@filipkis
Copy link
Author

Any chance this gets merged into main branch. It's rather simple, but IMHO valuable addition, so it shouldn't be hard to review.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants