> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# angular-subscribe-without-cleanup

> An RxJS subscription in a component has no completing operator or ngOnDestroy unsubscribe and keeps running after destruction.

## What it flags

An RxJS subscription in a component has no completing operator or ngOnDestroy unsubscribe and keeps running after destruction.

Put `takeUntilDestroyed()` after operators such as `switchMap()` that create inner subscriptions. An active inner subscription may outlive completion of the outer observable. Operators that wait for their source to complete, such as `last()` and `takeLast()`, do not end an infinite source.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "angular-subscribe-without-cleanup": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.