diff --git a/src/hotkeys.js b/src/hotkeys.js index 5b27ec1..c37df4d 100644 --- a/src/hotkeys.js +++ b/src/hotkeys.js @@ -11,7 +11,7 @@ 'use strict'; - angular.module('cfp.hotkeys', []).provider('hotkeys', function($injector) { + angular.module('cfp.hotkeys', []).provider('hotkeys', ['$injector', function($injector) { /** * Configurable setting to disable the cheatsheet entirely @@ -71,7 +71,7 @@ */ this.cheatSheetDescription = 'Show / hide this help menu'; - this.$get = function ($rootElement, $rootScope, $compile, $window, $document) { + this.$get = ['$rootElement', '$rootScope', '$compile', '$window', '$document', function ($rootElement, $rootScope, $compile, $window, $document) { var mouseTrapEnabled = true; @@ -593,9 +593,9 @@ }; - }) + }]) - .directive('hotkey', function (hotkeys) { + .directive('hotkey', ['hotkeys', function (hotkeys) { return { restrict: 'A', link: function (scope, el, attrs) { @@ -623,11 +623,11 @@ }); } }; - }) + }]) - .run(function(hotkeys) { + .run(['hotkeys', function(hotkeys) { // force hotkeys to run by injecting it. Without this, hotkeys only runs // when a controller or something else asks for it via DI. - }); + }]); })();