No, there is no need to unsubscribe in this case. A memory leak from a subscription occurs when the source of the observable is alive but the subscriber is destroyed. This usually happens with a root level service that stays alive for the life of the application which a component subscribes to and is later destroyed. Garbage collection will not then fully clean up the destroyed object instance of the component and the handling of the subscription stays active. In this case the source of the observable gets destroyed so there are no further emitted values and the source and subscriber get cleaned up since they are both destroyed. With all that said, it is never bad practice to unsubscribe if you are not sure if the subscription will cause a problem to be safe!
]]>Yes, that is a typical installation.
]]>Hi Venkat, I have not tried that version – please do and let us know!
]]>I am using 7.59.0 version. will the setup changes for that?
]]>Yes, the parent styles won’t apply by default because the component styling is encapsulated by default. You can apply the styling at the level of the dynamically created component instead. The other option is to change the component encapsulation, but this will cause the stylings to work globally instead and can lead to some pollution of other components if you aren’t careful. See https://angular.io/guide/view-encapsulation for more details on encapsulation.
]]>