Hello Sander,

Thank you. I started reading about Observables.

Anyways, where should i subscribe to them? On ngOnInit or the constructor? 
Where should i unsubscribe? On ngOnDestroy? All around what are the best 
practices when dealing with Observables in Angular 6+?

I already use the pipe in the template (see the following piece of code as 
example) but now i'm trying to clear the logic from my template and because 
of this i should handle Observables directly in the .ts file, i'd love to 
do it the correct way.

<button [disabled]="( isParticipantPosting$ | async)">


If you have good articles to read feel free to share, thank you very much :)

Regards,
Filipe

Il giorno lunedì 10 dicembre 2018 17:21:03 UTC+1, Sander Elias ha scritto:
>
> Hi Filipe,
>
> You are subscribing to an observable. An observable is not a promise, but 
> more like a stream. It keeps on running until the upstream observable is 
> complete, or until you unsubscribe. I can't explain Observable is a single 
> message, but there are loads of courses available online.
>
> Regards
> Sander  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to