angular-ui / ui-sortable

jQuery UI Sortable for AngularJS
http://angular-ui.github.io/ui-sortable/
MIT License
1.26k stars 444 forks source link

Adding ui and event arguments to attribute callback expressions #557

Closed filipkis closed 5 years ago

filipkis commented 5 years ago

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).