Coding task · Angular course · Module 7: RxJS
Practice: takeUntilDestroyed
An operator from @angular/core/rxjs-interop completes the subscription automatically when the component is destroyed, without ngOnDestroy and a Subject. It must be called in an injection context, e.g. in the constructor.
Task
Complete the code so that the interval() subscription ends by itself when the component is destroyed.