diff --git a/generators/client/templates/src/main/webapp/app/components/util/_sort.directive.js b/generators/client/templates/src/main/webapp/app/components/util/_sort.directive.js
index <HASH>..<HASH> 100644
--- a/generators/client/templates/src/main/webapp/app/components/util/_sort.directive.js
+++ b/generators/client/templates/src/main/webapp/app/components/util/_sort.directive.js
@@ -31,7 +31,7 @@
         vm.sort = sort;
         vm.triggerApply = triggerApply;
 
-        $scope.$watchGroup(['predicate', 'ascending'], vm.triggerApply);
+        $scope.$watchGroup(['vm.predicate', 'vm.ascending'], vm.triggerApply);
         vm.triggerApply();
 
         function applyClass (element) {
@@ -67,7 +67,7 @@
             }
             vm.predicate = field;
             $scope.$apply();
-            $scope.callback();
+            vm.callback();
         }
 
         function triggerApply (values)  {
fix entity sorting

fix entity sorting by correcting watches and callback

fix #<I>