From 7d1cfd217a6789d5dd022119ac335374766e8232 Mon Sep 17 00:00:00 2001 From: Atef Ben Ali Date: Thu, 28 Sep 2017 10:26:22 +0100 Subject: [PATCH] Manually Identify Dependencies see https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y091 --- z-metadata/z-metadata/app/controller.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/z-metadata/z-metadata/app/controller.js b/z-metadata/z-metadata/app/controller.js index dee99fcc..bb5a3a60 100644 --- a/z-metadata/z-metadata/app/controller.js +++ b/z-metadata/z-metadata/app/controller.js @@ -7,10 +7,14 @@ */ (function() { - angular.module('app').controller('TodoController', - ['$q', '$scope', '$timeout', 'dataservice', 'logger', controller]); - - function controller($q, $scope, $timeout, dataservice, logger) { + angular.module('app').controller( + 'TodoController', + TodoController + ); + // @see https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#style-y091 + TodoController.$inject = ['$q', '$scope', '$timeout', 'dataservice', 'logger']; + + function TodoController($q, $scope, $timeout, dataservice, logger) { // The controller's API to which the view binds var vm = this; vm.addItem = addItem; @@ -230,4 +234,4 @@ }; } -})(); \ No newline at end of file +})();