mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
update forkJoin parameters since it's new version now receives an array of observables
This commit is contained in:
parent
017ba9188f
commit
3d1f870c91
4 changed files with 17 additions and 18 deletions
|
|
@ -17,10 +17,10 @@ export class ContactsComponent implements OnDestroy {
|
|||
recent: any[];
|
||||
|
||||
constructor(private userService: UserData) {
|
||||
forkJoin(
|
||||
forkJoin([
|
||||
this.userService.getContacts(),
|
||||
this.userService.getRecentUsers(),
|
||||
)
|
||||
])
|
||||
.pipe(takeWhile(() => this.alive))
|
||||
.subscribe(([contacts, recent]: [Contacts[], RecentUsers[]]) => {
|
||||
this.contacts = contacts;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { Component, OnDestroy } from '@angular/core';
|
||||
import { NbThemeService } from '@nebular/theme';
|
||||
|
||||
import { Electricity, ElectricityChart, ElectricityData } from '../../../@core/data/electricity';
|
||||
import { takeWhile } from 'rxjs/operators';
|
||||
import { forkJoin } from 'rxjs';
|
||||
|
|
@ -31,10 +30,10 @@ export class ElectricityComponent implements OnDestroy {
|
|||
this.currentTheme = theme.name;
|
||||
});
|
||||
|
||||
forkJoin(
|
||||
forkJoin([
|
||||
this.electricityService.getListData(),
|
||||
this.electricityService.getChartData(),
|
||||
)
|
||||
this.electricityService.getChartData()
|
||||
])
|
||||
.pipe(takeWhile(() => this.alive))
|
||||
.subscribe(([listData, chartData]: [Electricity[], ElectricityChart[]]) => {
|
||||
this.listData = listData;
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ export class TemperatureComponent implements OnDestroy {
|
|||
this.theme = config.variables.temperature;
|
||||
});
|
||||
|
||||
forkJoin(
|
||||
forkJoin([
|
||||
this.temperatureHumidityService.getTemperatureData(),
|
||||
this.temperatureHumidityService.getHumidityData(),
|
||||
)
|
||||
])
|
||||
.subscribe(([temperatureData, humidityData]: [Temperature, Temperature]) => {
|
||||
this.temperatureData = temperatureData;
|
||||
this.temperature = this.temperatureData.value;
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ export class ECommerceVisitorsAnalyticsComponent implements OnDestroy {
|
|||
this.setLegendItems(theme.variables.visitorsLegend);
|
||||
});
|
||||
|
||||
forkJoin(
|
||||
forkJoin([
|
||||
this.visitorsAnalyticsChartService.getInnerLineChartData(),
|
||||
this.visitorsAnalyticsChartService.getOutlineLineChartData(),
|
||||
this.visitorsAnalyticsChartService.getPieChartData(),
|
||||
)
|
||||
])
|
||||
.pipe(takeWhile(() => this.alive))
|
||||
.subscribe(([innerLine, outerLine, pieChartValue]: [number[], OutlineData[], number]) => {
|
||||
this.visitorsAnalyticsData = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue