# injectIsMutating

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

```ts
function injectIsMutating(filters?: () => Omit<MutationFilters, "status">): Signal<number>;
```

Defined in: [packages/angular-query/src/inject-is-mutating.ts:30](https://github.com/TanStack/query/blob/main/packages/angular-query/src/inject-is-mutating.ts#L30)

Injects a signal that tracks the number of mutations that your application currently has `pending`
(useful for app-wide loading indicators).

## Parameters

### filters?

() => `Omit`\<[`MutationFilters`](../interfaces/MutationFilters.md), `"status"`\>

A function returning the [MutationFilters](../interfaces/MutationFilters.md) to narrow down the matched mutations.
Similar to `computed` from Angular, this function runs in the reactive context, so signals read inside it
re-narrow the matched mutations.

<a id="filters-properties"></a>

#### `filters` properties

Built from [`MutationFilters`](../interfaces/MutationFilters.md#properties). See the type above for what it changes.

## Returns

`Signal`\<`number`\>

A `Signal` with the number of mutations that your application currently has `pending`.

## Example

```angular-ts
@Component({
  selector: 'posts-mutating-indicator',
  template: `
    @if (isMutatingPosts()) {
      <span>Saving posts...</span>
    }
  `,
})
export class PostsMutatingIndicator {
  // How many mutations matching the posts prefix are in progress?
  readonly isMutatingPosts = injectIsMutating(() => ({ mutationKey: ['posts'] }))
}
```
