Looking at the structure of my code, I see that there are numerous Observables and ReplaySubjects. When trying to extract a value from one of these observables in the HTML template, what would be the most effective approach? In certain situations, parameters from the template may also need to be considered.
public config$ = new ReplaySubject<Config>(1);
public getValue(foo: number): number {
this.config$.pipe(take(1)).subscribe((config) => {
// something like return config.value + foo;
});
}