ngOnDestroy() this.destroy$.next(); this.destroy$.complete();
Useful for creating complex objects dynamically. In Angular, this is often used with Dependency Injection to decide which service implementation to provide at runtime. angular design patterns and best practices pdf
Below is an example of a detailed table of content for an assumed eBook/ Guide ngOnDestroy() this
Reputable sources: