Considering this super class :
import { Directive, OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
@Directive()
export class Destroy implements OnDestroy {
protected destroyed$ = new Subject();
public ngOnDestroy() {
this.destroyed$.next();
this.destroyed$.unsubscribe();
}
}
In the components extending Destroy, having takeUntil(this.destroyed$) before each subscribe should be enough to fullfill prefer-takeuntil rule.
But there is the following issue :
error `ngOnDestroy` is not implemented rxjs-angular/prefer-takeuntil
Considering this super class :
In the components extending Destroy, having takeUntil(this.destroyed$) before each subscribe should be enough to fullfill prefer-takeuntil rule.
But there is the following issue :
error `ngOnDestroy` is not implemented rxjs-angular/prefer-takeuntil