From b9096fb189db0fd830c2627a1f7a93f08cdaa73f Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Thu, 9 Jun 2016 14:37:15 +0200 Subject: [PATCH] Refactor HalLink a little --- .../components/api/api-v3/hal-link/hal-link.service.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/api/api-v3/hal-link/hal-link.service.ts b/frontend/app/components/api/api-v3/hal-link/hal-link.service.ts index 3c1297fbf5..a7f85ef885 100644 --- a/frontend/app/components/api/api-v3/hal-link/hal-link.service.ts +++ b/frontend/app/components/api/api-v3/hal-link/hal-link.service.ts @@ -26,6 +26,8 @@ // See doc/COPYRIGHT.rdoc for more details. //++ +import {opApiModule} from "../../../../angular-modules"; + var $q:ng.IQService; var apiV3:restangular.IService; @@ -77,13 +79,13 @@ export class HalLink implements HalLinkInterface { } } -function halLink(_$q_:ng.IQService, _apiV3_:restangular.IService) { +function halLinkService(_$q_:ng.IQService, _apiV3_:restangular.IService) { $q = _$q_; apiV3 = _apiV3_; return HalLink; } -angular - .module('openproject.api') - .factory('HalLink', ['$q', 'apiV3', halLink]); +halLinkService.$inject = ['$q', 'apiV3']; + +opApiModule.factory('HalLink', halLinkService);