I know how to combine observables and fetch the result when all observables emit at least one value (combineLatest, forkJoin, etc.).
But how can I emit a value when one of many observables emits a value?
For example:
const adModelChangedObs$ = this.editAdService.adModelChanged; // Angular subject one
const refreshPreviewClickedObs$ = this.editAdService.refreshPreviewClick // Angular subject two
merge([adModelChangedObs$, refrshPreviewClickedObs$]).subscribe(() => {
console.log('One of the two observables emitted a value');
});
The subscribe handler is not being executed, although I tried it with many RxJS operators for far.
adModelandrefreshPreviewthat they are emitting?