Adding an array element. #32

Closed
terryschwabl opened this Issue Feb 14, 2014 · 1 comment

Projects

None yet

2 participants

@terryschwabl

When i call .unshift(itemObj), I get an error when trying to move the object. At nestedSortableItemCtrl.js:31 saying "Cannot read property '0' of undefined".

$scope.itemData = function() {
31: return $scope.sortableModelValue[$scope.$index];
};

@JimLiu
Contributor
JimLiu commented Feb 14, 2014

@terryschwabl
Did you call $scope.$apply() after you called .unshift(itemObj)?
If you changed the datasource bound, sometimes you have to call $scope.$apply() rebind the data.

@JimLiu JimLiu added a commit that referenced this issue Feb 26, 2014
@JimLiu JimLiu Add #32 to dev notes 75f78db
@JimLiu JimLiu added a commit that referenced this issue Feb 26, 2014
@JimLiu JimLiu Add link to #32 d227486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment