ОС
this.loginService.user$ - BS;
this.mainService.getData - http;
this.vm$ = this.reloadTable$.pipe(
startWith(1),
switchMap(() => this.loginService.user$),
switchMap(({ userId }) => this.mainService.getData(userId as number))
);
Size: a a a
ОС
D
ОС
D
D
ОС
ОС
this.errTable$ = this.reloadErrTable$.pipe(
startWith(1),
map(() => ({ isLoading: true })),
switchMap(() => this.sprService.getErrLogPeriod()),
map((data) => ({ data, isLoading: false })),
catchError((err) => of({ isLoading: false, err }))
);
isLoading
== true - показывать в шаблоне spinner.DМ
DМ
DT
this.errTable$ = this.reloadErrTable$.pipe(
startWith(1),
map(() => ({ isLoading: true })),
switchMap(() => this.sprService.getErrLogPeriod()),
map((data) => ({ data, isLoading: false })),
catchError((err) => of({ isLoading: false, err }))
);
isLoading
== true - показывать в шаблоне spinner.ОС
DT
KN
SФ
SФ
KN
SФ
ОС
OZ
DG