I\'m using ngrx store to record state, my state currently holds my list of accounts and the current page (for paging).
On my list of accounts component i call the st
You can create an async function and convert the observable to a promise and await it
async method(){
var pageNr = await this.currentPage$.toPromise();
this.getListOfCustomer(pageNr);
}
subscribe to get result as number:
let currentPageSub :Subscription;
...
this.currentPageSub = this.store.select(getCurrentPage).subscribe(
(page: number) => {
this.currentPage$=page;
}
);