How I can combine both select in single function. I have tried few method eg: combineLatest and it's not calling Other stackoverflow disccusion. Is there any way I can both in sigle function?
constructor(private store: Store<fromStore.AppState>) {}
ngOnInit(): void {
this.store
.select("userInfo", "user")
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((userInfo) => {
console.log(userInfo);
});
this.store
.select("cart")
.pipe(takeUntil(this._unsubscribeAll))
.subscribe((detail) => {
console.log(detail);
});
}
Use selectors, then create a selector based on the user selector and cart selector.