From f6496b2d01a993784e2a811c8c4e8191768e71f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Andr=C3=A9?= Date: Tue, 6 Dec 2016 18:14:30 -0300 Subject: [PATCH 1/4] introducing array notation --- src/hotkeys.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hotkeys.js b/src/hotkeys.js index 5b27ec1..114cc08 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', [function($injector) { /** * Configurable setting to disable the cheatsheet entirely @@ -593,9 +593,9 @@ }; - }) + }]) - .directive('hotkey', function (hotkeys) { + .directive('hotkey', [function (hotkeys) { return { restrict: 'A', link: function (scope, el, attrs) { @@ -623,7 +623,7 @@ }); } }; - }) + }]) .run(function(hotkeys) { // force hotkeys to run by injecting it. Without this, hotkeys only runs From f02c44601879b711b2b102470a2a6c50e1bc597e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Andr=C3=A9?= Date: Tue, 6 Dec 2016 18:25:44 -0300 Subject: [PATCH 2/4] array notation fix --- src/hotkeys.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotkeys.js b/src/hotkeys.js index 114cc08..fba20cc 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 @@ -595,7 +595,7 @@ }]) - .directive('hotkey', [function (hotkeys) { + .directive('hotkey', ['hotkeys', function (hotkeys) { return { restrict: 'A', link: function (scope, el, attrs) { From 2b17e56ec9dd422b238ba9cc6afafb87a4468615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Andr=C3=A9?= Date: Wed, 7 Dec 2016 11:21:34 -0300 Subject: [PATCH 3/4] array notation fixing --- src/hotkeys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotkeys.js b/src/hotkeys.js index fba20cc..6ae5b87 100644 --- a/src/hotkeys.js +++ b/src/hotkeys.js @@ -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; From 504e6633a6d1b332eb0d4efbdbed6cb477e582f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Andr=C3=A9?= Date: Wed, 7 Dec 2016 17:54:03 -0300 Subject: [PATCH 4/4] array notation fixing --- src/hotkeys.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotkeys.js b/src/hotkeys.js index 6ae5b87..c37df4d 100644 --- a/src/hotkeys.js +++ b/src/hotkeys.js @@ -625,9 +625,9 @@ }; }]) - .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. - }); + }]); })();