Редактировать некоторые неправильно набранные
Что я сделал
// in component
export class WhatIdidComponent implements OnInit {
storeData$
combine$;
constructor(
private store: Store<AppState>
private route: ActivatedRoute,
) {
this.storeData$ = this.store.pipe(select((state: AppState) => state['p']['reviews']), share());
this.combine$ = combineLatest(
//I inserted async storeData$ variable in combineLatest
this.storeData$,
this.route.params.pipe(/*any operator*/)
)
}
}
// d
//in template.html
<ng-container *ngIf="(storeData$ | async) as data; else loading">
// not working properly when this.storeData$ is in combineLatest
{{data.blah}}
</ng-container>
storeData $ с асинхронным каналомне работает, когда я вставляю this.storeData
в combineLatest
Я думал, что this.storeData $ не имеет ничего общего с combineLatest
.потому что this.storeData$
- это this.storeData$
.
, но, похоже, это связано с combineLatest
.Зачем?и как решить эту проблему?
Что я хочу, это
- правильно работать с this.storeData и асинхронным каналом.
Спасибо за чтение