diff --git a/frontend/app/components/work-packages/wp-subject/wp-subject.directive.ts b/frontend/app/components/work-packages/wp-subject/wp-subject.directive.ts index 0ae89b815e..9eace0eef1 100644 --- a/frontend/app/components/work-packages/wp-subject/wp-subject.directive.ts +++ b/frontend/app/components/work-packages/wp-subject/wp-subject.directive.ts @@ -37,10 +37,12 @@ export class WorkPackageSubjectController { constructor(protected $scope, protected $stateParams, protected wpCacheService) { - scopedObservable($scope, wpCacheService.loadWorkPackage($stateParams.workPackageId)) + if (!this.workPackage) { + scopedObservable($scope, wpCacheService.loadWorkPackage($stateParams.workPackageId)) .subscribe((wp: WorkPackageResource) => { this.workPackage = wp; }); + } } } @@ -48,7 +50,9 @@ function wpSubjectDirective() { return { restrict: 'E', templateUrl: '/components/work-packages/wp-subject/wp-subject.directive.html', - scope: {}, + scope: { + workPackage: '=?' + }, bindToController: true, controller: WorkPackageSubjectController, controllerAs: '$ctrl' diff --git a/frontend/app/components/wp-create/wp-create.directive.html b/frontend/app/components/wp-create/wp-create.directive.html index dc1bed4912..205cd481d5 100644 --- a/frontend/app/components/wp-create/wp-create.directive.html +++ b/frontend/app/components/wp-create/wp-create.directive.html @@ -1,7 +1,10 @@