@oguzhan18/angular-destroyref
ALWAYS use when working with Angular DestroyRef, takeUntilDestroyed, or cleanup in Angular.
No skills found in this collection.
SKILL.md
| name | angular-destroyref |
| description | ALWAYS use when working with Angular DestroyRef, takeUntilDestroyed, or cleanup in Angular. |
Angular DestroyRef
Version: Angular 16+ (2025) Tags: DestroyRef, Cleanup, takeUntilDestroyed
References: DestroyRef
Best Practices
- Use takeUntilDestroyed
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({})
export class MyComponent {
private destroyRef = inject(DestroyRef);
ngOnInit() {
this.data$.pipe(
takeUntilDestroyed(this.destroyRef)
).subscribe();
}
}
- Use in service
@Injectable({ providedIn: 'root' })
export class DataService {
private destroyRef = inject(DestroyRef);
getData() {
return this.http.get('/api/data').pipe(
takeUntilDestroyed(this.destroyRef)
);
}
}
Loading...
Select a file to preview
Analyzing security...
Checking scan reports and verification data.
Bill of Materials
Everything this skill can do — files, network, commands, and more.
No demos yet. To add one, ask your AI agent: "Submit a demo for @oguzhan18/angular-destroyref" — or upload via the API.
To add a demo, ask your AI agent: "Submit a demo for @oguzhan18/angular-destroyref"
No eval data yet. Eval results are published via the SkillSafe API.