skip to Main Content

Javascript – Combine multiple Subjects and Observables

I have the following piece of code: readonly todos$: Observable<Todo[]> = combineLatest([this.account$, this.loadTodoPage$]).pipe( concatMap(([account, pageNo]) => this.todoService.getTodos(account.id, pageNo)), scan((acc: Todo[], curr: Todo[]) => [...acc, ...curr], []) ); This always loads a new page of todos from the backend when i…

VIEW QUESTION
Back To Top
Search