Can someone explain what "outputFromObservable" is in Angular? Where would you use this, and...

Discussão em 'Angular' iniciado por mohammed fahimullah, Outubro 12, 2024.

  1. https://angular.dev/guide/signals/rxjs-interop#outputfromobservable

    This is very difficult for me to understand. There is not much example available here.

    public count:OutputRef<number> = outputFromObservable(this.countObservable$);
    public output3 = output()

    public ngOnInit(): void {
    this.count.subscribe(val => console.log(val));
    }


    If i use this outputFormObservable I get only one method for the count variable that is to subscribe. Sill why ? I mean we can directly subscribe from the observable ?

    Continue reading...

Compartilhe esta Página