# injectIsMutating

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

```ts
function injectIsMutating(filters?: Omit<MutationFilters<unknown, Error, unknown, unknown>, "status">, options?: InjectIsMutatingOptions): Signal<number>;
```

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

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)\<`unknown`, `Error`, `unknown`, `unknown`\>, `"status"`\>

The [MutationFilters](../interfaces/MutationFilters.md) to narrow down 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.

### options?

[`InjectIsMutatingOptions`](../interfaces/InjectIsMutatingOptions.md)

Additional configuration

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

#### `options` properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="options-property-injector"></a> `injector?` | `Injector` | The `Injector` in which to create the isMutating signal. If this is not provided, the current injection context will be used instead (via `inject`). |

## 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'] })
}
```
