Skip to content
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

scope.$watchGroup is not a function #357

Open
anoopsinghbayes opened this issue Dec 14, 2016 · 1 comment
Open

scope.$watchGroup is not a function #357

anoopsinghbayes opened this issue Dec 14, 2016 · 1 comment

Comments

@anoopsinghbayes
Copy link

i have to support angular 1.2.25 application ,i am using ng-sortable 1.3.5 it get the following error
"scope.$watchGroup is not a function",
scope.$watchGroup is supported only for version from 1.3 and above
as per comments in this issue https://github.com/a5hik/ng-sortable/issues/192
ng-sortable should work with all version as in 1.1, 1.2, 1.3, 1.4

@Ed-Hong
Copy link

Ed-Hong commented Jun 7, 2018

Ran into this issue as well updating the library on a v1.2.25 module.
I was able to get around this by removing the scope.$watchGroup call and using individual scope.$watch statements as follows:

scope.$watch('sortableScope.isDisabled', function (newValue) { if (isDisabled !== newValue) { isDisabled = newValue; if (isDisabled) { unbindDrag(); } else { bindDrag(); } } else { bindDrag(); } });
scope.$watch('sortableScope.options.longTouch', function (newValue) { if(isLongTouch !== newValue) { isLongTouch = newValue; unbindDrag(); bindDrag(); } else { bindDrag(); } });

Hope this helps

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

No branches or pull requests

2 participants