Use observeOnScope

pull/5181/head
Roman Roelofsen 8 years ago
parent 5a5170455d
commit dde6b9f1a1
  1. 5
      frontend/app/components/wp-table/timeline/wp-timeline-container.directive.ts

@ -53,7 +53,8 @@ export class WorkPackageTimelineTableController {
public disableViewParamsCalculation = false;
constructor(private $element: ng.IAugmentedJQuery,
constructor(private $scope: IScope,
private $element: ng.IAugmentedJQuery,
private TypeResource,
private states: States) {
@ -111,7 +112,7 @@ export class WorkPackageTimelineTableController {
addWorkPackage(wpId: string): Observable<RenderInfo> {
// console.log("addWorkPackage() = " + wpId);
const wpObs = this.states.workPackages.get(wpId).observe(null)
const wpObs = this.states.workPackages.get(wpId).observeOnScope(this.$scope)
.map((wp: any) => {
this.workPackagesInView[wp.id] = wp;
const viewParamsChanged = this.calculateViewParams(this._viewParameters);

Loading…
Cancel
Save