From e18a5d550675fd1039890d4480986a5fe674368b Mon Sep 17 00:00:00 2001 From: Matthieu Benoist <mbenoist@ausy-group.com> Date: Mon, 10 Jan 2022 11:12:57 +0100 Subject: [PATCH] move data initialisation from ngOnInit to initDatasetInfo (route based) --- .../components/dataset-detail/dataset-detail.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/dataset-detail/components/dataset-detail/dataset-detail.component.ts b/src/app/dataset-detail/components/dataset-detail/dataset-detail.component.ts index a37b0c61..d817cf7e 100644 --- a/src/app/dataset-detail/components/dataset-detail/dataset-detail.component.ts +++ b/src/app/dataset-detail/components/dataset-detail/dataset-detail.component.ts @@ -61,8 +61,6 @@ export class DatasetDetailComponent implements OnInit, OnDestroy { this.isLoading = true; this.initDatasetInfo(); }); - - this._datasetDetailService.retrieveDatasetData().subscribe(); } ngOnDestroy() { @@ -249,6 +247,8 @@ export class DatasetDetailComponent implements OnInit, OnDestroy { // Emit event to indicate to child component that the dataset has changed this._datasetDetailService.datasetChanged(); + // move subscription from ngOnInit + this._datasetDetailService.retrieveDatasetData().subscribe(); } setPosition() { -- GitLab