0👍
✅
you can use async pipe
dataSourceObservable :Observable<any>
constructor(private serverService: ServerService) {
this.dataSourceObservable = this.serverService.getServers()
.map(response => response.json());
}
...
<div *ngIf=getGraphClicked>
<fusioncharts
[id]="id"
[width]="width"
[height]="height"
[type]="type"
[dataFormat]="dataFormat"
[dataSource]="dataSourceObservable | async">
</fusioncharts>
</div>
Source:stackexchange.com