Source : Learn to combine RxJs sequences with super intuitive interactive diagrams
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* When manually subscribing to an observable in a view component, developers are traditionally required | |
* to unsubscribe during ngOnDestroy. This utility method auto-configures and manages that relationship | |
* by watching the DOM with a MutationObserver and internally using the takeUntil RxJS operator. | |
* | |
* Angular 7 has stricter enforcements and throws errors with monkey-patching of view component life-cycle methods. | |
* Here is an updated version that uses MutationObserver to accomplish the same goal. | |
* | |
* @code | |
* |