summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/home
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-09-20 17:51:54 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-09-20 17:52:08 +0800
commit371098805b90e3eebbaff181703a0e4e79e795bc (patch)
tree59f42dbf7c4975d51f6b66e794ee43ce18ab9a96 /usecaseui-portal/src/app/views/home
parent2df65a7f82faf11f0f0a6e16c9864902a9388c89 (diff)
bug: fix problems caused by switching routes
Change-Id: I9558b3fd6b8df089a5da47a08ee89c069b4fcb34 Issue-ID: USECASEUI-306 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/home')
-rw-r--r--usecaseui-portal/src/app/views/home/home.component.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/usecaseui-portal/src/app/views/home/home.component.ts b/usecaseui-portal/src/app/views/home/home.component.ts
index 92e7e881..a7f312e6 100644
--- a/usecaseui-portal/src/app/views/home/home.component.ts
+++ b/usecaseui-portal/src/app/views/home/home.component.ts
@@ -31,7 +31,7 @@ export class HomeComponent implements OnInit {
@HostBinding('@routerAnimate') routerAnimateState;
@ViewChild('seriverChart') seriverChart;
@ViewChild('services') services: ElementRef;
-
+ resizeMark
constructor(
private myhttp: HomesService,
@@ -49,18 +49,19 @@ export class HomeComponent implements OnInit {
this.getHomeServiceBarNsData();
this.getHomeServiceBarVnfData();
this.getHomeServiceBarPnfData();
- Observable.fromEvent(window,'resize')
+ this.resizeMark = Observable.fromEvent(window,'resize')
.subscribe((event) => {
- this.seriverChart.resize(this.services.nativeElement.offsetHeight)
+ this.seriverChart.resize(this.services.nativeElement.offsetHeight,250)
})
}
ngAfterViewInit(){
- this.seriverChart.resize(this.services.nativeElement.offsetHeight)
-
-
+ this.seriverChart.resize(this.services.nativeElement.offsetHeight,250)
}
+ ngOnDestroy(){
+ this.resizeMark.unsubscribe()
+ }
// services
serviceNumber: number = 0;