Answer the question
In order to leave comments, you need to log in
Why is the internal observer called?
There is such a stream of clicks:
this.createReestrClick
.pipe(
switchMap(() => this.documentsRepository.selectedDocumentsFilesIds$),
tap((ids) => console.log(ids)),
)
.subscribe();
this.documentsRepository.selectedDocumentsFilesIds$
also broadcasts a stream. switchMap(() => this.documentsRepository.selectedDocumentsFilesIds$),
emitt values? public createReestr() {
this.createReestrClick.next();
}
Answer the question
In order to leave comments, you need to log in
Worked thanks to take(1):
this.createReestrClick
.pipe(mergeMap(() => this.documentsRepository.selectedDocumentsFilesIds$.pipe(take(1))))
.subscribe((r) => {
console.log(r);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question