Мне нужно сделать 3 звонка в мой ngrx
магазин
Итак, что у меня было
getUserInfo() {
this._store.select('userInfo')
.subscribe(result => this.userInfo = result);
}
getCats() {
this._store.select('cats')
.subscribe(result => this.cats = result);
}
getDogs() {
this._store.select('dogs')
.subscribe(result => this.dogs = result);
}
, сейчас я пытаюсь сжать это в один метод, чтобы япопробовал это
Я импортирую rxjs примерно так
import { combineLatest } from 'rxjs';
import { tap, filter } from 'rxjs/operators';
и это мой метод
getStoreData() {
combineLatest(
this._store.select('userInfo'),
this._store.select('cats'),
this._store.select('dogs')
).pipe(tap(([userInfo, cats, dogs]) => console.log(userInfo, cats, dogs));
}
Я называю свой метод так
ngOninit() {
this.getStoreData()
}
моя проблема в том, что метод вызывается, но я никогда не получаю журнал консоли?
Я не уверен, что делаю неправильно
РЕДАКТИРОВАТЬ
Я также пытался
getStoreData {
forkJoin(
this._store.pipe(select('userInfo')),
this._store.pipe(select('xberts')),
this._store.pipe(select('tasks'))
).subscribe(res => console.log(res));
}
, но все та же проблема, нет console.log()
Любая помощь будет оценена!