'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();
      });
    }
  };
});

'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());
        });
      }
    };
  }
]);

Refactor and fix prevToken directive
Refactor and fix prevToken directive
