a5hik / ng-sortable

AngularJS Library for Drag and Drop, supports Sortable and Draggable. Supports Touch devices.

Home Page:http://a5hik.github.io/ng-sortable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

event.source.itemScope is undefined

noullet opened this issue · comments

Hi,

Since 1.3.7, event.source.itemScope is undefined when accessed in orderChanged and itemMoved.

The change 29b56a1 motivated by #93 is the cause of this issue.

In my case, I want to get the model value:

orderChanged: function(event) {
    var model = event.source.itemScope.modelValue;
    // ...
},

And here is what I get:

angular.js:13920 TypeError: Cannot read property 'modelValue' of undefined

I don't think I'm doing anything special but I am surprised that this issue hasn't be raised yet. Please tell me if you can't reproduce it.

This is also happening to me.

bug exists for me as well.

commented

Happening here also

+1, Also having this issue. 😕

+1

Happening here too

In version 1.3.6 has this error.
In version 1.3.4 does not have this error.

fixed in 1.3.8