diff --git a/frontend/app/components/wp-relations/wp-relation-group/wp-child-relation-group.service.ts b/frontend/app/components/wp-relations/wp-relation-group/wp-child-relation-group.service.ts index 60a7100853..6c4ff8d40d 100644 --- a/frontend/app/components/wp-relations/wp-relation-group/wp-child-relation-group.service.ts +++ b/frontend/app/components/wp-relations/wp-relation-group/wp-child-relation-group.service.ts @@ -45,7 +45,7 @@ export class WorkPackageChildRelationsGroup extends WorkPackageRelationGroup { return relation.$load(); } - public addWpRelation() { + public addWpRelation():ng.IPromise { return this.workPackage.project.$load() .then(() => { const args = [ @@ -60,7 +60,7 @@ export class WorkPackageChildRelationsGroup extends WorkPackageRelationGroup { args[0] = 'work-packages.new'; } - $state.go(...args); + ($state).go(...args); }); } @@ -91,8 +91,8 @@ export class WorkPackageChildRelationsGroup extends WorkPackageRelationGroup { } } -function wpChildRelationsGroupService() { - [$state, $q] = arguments; +function wpChildRelationsGroupService(...args) { + [$state, $q] = args; return WorkPackageChildRelationsGroup; } diff --git a/frontend/app/components/wp-relations/wp-relation-group/wp-parent-relation-group.service.ts b/frontend/app/components/wp-relations/wp-relation-group/wp-parent-relation-group.service.ts index 8a1fbc96d8..799827dd62 100644 --- a/frontend/app/components/wp-relations/wp-relation-group/wp-parent-relation-group.service.ts +++ b/frontend/app/components/wp-relations/wp-relation-group/wp-parent-relation-group.service.ts @@ -26,8 +26,8 @@ // See doc/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageRelationGroup} from "./wp-relation-group.service"; -import {wpTabsModule} from "../../../angular-modules"; +import {WorkPackageRelationGroup} from './wp-relation-group.service'; +import {wpTabsModule} from '../../../angular-modules'; var HalResource; var PathHelper:any; @@ -72,8 +72,8 @@ export class WorkPackageParentRelationGroup extends WorkPackageRelationGroup { } } -function wpParentRelationGroupService() { - [HalResource, PathHelper] = arguments; +function wpParentRelationGroupService(...args) { + [HalResource, PathHelper] = args; return WorkPackageParentRelationGroup; } diff --git a/frontend/app/components/wp-relations/wp-relation-group/wp-relation-group.service.ts b/frontend/app/components/wp-relations/wp-relation-group/wp-relation-group.service.ts index a4d19ad76e..d9547c9d06 100644 --- a/frontend/app/components/wp-relations/wp-relation-group/wp-relation-group.service.ts +++ b/frontend/app/components/wp-relations/wp-relation-group/wp-relation-group.service.ts @@ -100,7 +100,7 @@ export class WorkPackageRelationGroup { return deferred.promise; } - public addWpRelation(wpId:number):ng.IPromise { + public addWpRelation(wpId:number):ng.IPromise { return this.workPackage.addRelation({ to_id: wpId, relation_type: this.id @@ -126,8 +126,8 @@ export class WorkPackageRelationGroup { } } -function wpRelationGroupService() { - [$q, $http, PathHelper] = arguments; +function wpRelationGroupService(...args) { + [$q, $http, PathHelper] = args; return WorkPackageRelationGroup; }