diff options
Diffstat (limited to 'js/app/Config.js')
-rw-r--r-- | js/app/Config.js | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/js/app/Config.js b/js/app/Config.js index a200ceaa5..62a079808 100644 --- a/js/app/Config.js +++ b/js/app/Config.js @@ -46,36 +46,30 @@ app.config(function ($routeProvider, $provide, $httpProvider) { var getResolve = function (type) { return { // request to items also returns feeds - data: [ - '$http', - '$route', - '$q', - 'BASE_URL', - 'ITEM_BATCH_SIZE', - function ($http, $route, $q, BASE_URL, ITEM_BATCH_SIZE) { + data: /* @ngInject */ function ( + $http, $route, $q, BASE_URL, ITEM_BATCH_SIZE) { - var parameters = { - type: type, - limit: ITEM_BATCH_SIZE - }; + var parameters = { + type: type, + limit: ITEM_BATCH_SIZE + }; - if ($route.current.params.id !== undefined) { - parameters.id = $route.current.params.id; - } + if ($route.current.params.id !== undefined) { + parameters.id = $route.current.params.id; + } - var deferred = $q.defer(); + var deferred = $q.defer(); - $http({ - url: BASE_URL + '/items', - method: 'GET', - params: parameters - }).success(function (data) { - deferred.resolve(data); - }); + $http({ + url: BASE_URL + '/items', + method: 'GET', + params: parameters + }).success(function (data) { + deferred.resolve(data); + }); - return deferred.promise; - } - ] + return deferred.promise; + } }; }; |