'use strict';

angular.module('arethusa.core').directive('prevToken', [
  'state',
  function (state) {
    return {
      restrict: 'AE',
      link: function (scope, element, attrs) {
        element.bind('click', function (e) {
          scope.$apply(state.selectPrevToken());
        });
      }
    };
  }
]);

'use strict';
angular.module('arethusa.core').directive('prevToken', function () {
  return {
    restrict: 'E',
    link: function (scope, element, attrs) {
      element.bind('click', function (e) {
        scope.state.selectPrevToken();
        scope.$apply();
      });
    }
  };
});

--- 
+++ 
@@ -1,15 +1,12 @@
 'use strict';
-
-angular.module('arethusa.core').directive('prevToken', [
-  'state',
-  function (state) {
-    return {
-      restrict: 'AE',
-      link: function (scope, element, attrs) {
-        element.bind('click', function (e) {
-          scope.$apply(state.selectPrevToken());
-        });
-      }
-    };
-  }
-]);
+angular.module('arethusa.core').directive('prevToken', function () {
+  return {
+    restrict: 'E',
+    link: function (scope, element, attrs) {
+      element.bind('click', function (e) {
+        scope.state.selectPrevToken();
+        scope.$apply();
+      });
+    }
+  };
+});
Refactor and fix prevToken directive
