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

Html – <select> not redirecting to a url

I'm trying to get my select tag to redirect me to a url that is in option value. For example this is my code: <select #selectElement (change)="redirectToUrl(selectElement.value)"> <option value="/add-product">Add a product</option> </select> And in .component.ts is: @ViewChild('selectElement', { static: false…

VIEW QUESTION
Back To Top
Search