Tomas Trajan
1 min readMay 15, 2019

--

Hi santhosh raju!

Well the observable will re-subscribe when the component is recreated because the template will be re-evaluated and the | async pipe will teigger subscription.

In context of components, you don;t really want to re-subscribe because the component was usually destroyed.

In case you really need to do it, you can always call .subscribe() again on the observable even though this usually will not be a nice clean code so maybe it makes more sense to reconsider why do you even need to do it…

Cheers!

--

--

Tomas Trajan
Tomas Trajan

Written by Tomas Trajan

👋 I build, teach, write & speak about #Angular & #NgRx for enterprises 👨‍💻 Google Developer Expert #GDE 👨‍🏫 @AngularZurich meetup co-organizer

Responses (1)