Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/hotkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -593,9 +593,9 @@
};


})
}])

.directive('hotkey', function (hotkeys) {
.directive('hotkey', ['hotkeys', function (hotkeys) {
return {
restrict: 'A',
link: function (scope, el, attrs) {
Expand Down Expand Up @@ -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.
});
}]);

})();