Open History to see the last commit
1---
2id: injectIsFetching
3title: injectIsFetching
4---
5β
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7β
8```ts
9function injectIsFetching(filters?: () => QueryFilters): Signal<number>;
10```
11β
12Defined in: [packages/angular-query/src/inject-is-fetching.ts:15](https://github.com/TanStack/query/blob/main/packages/angular-query/src/inject-is-fetching.ts#L15)
13β
14Injects a signal that tracks the number of queries that your application is loading or fetching in the
15background (useful for app-wide loading indicators).
16β
17Can be used for app-wide loading indicators.
18β
19## Parameters
20β
21### filters?
22β
23() => [`QueryFilters`](../interfaces/QueryFilters.md)
24β
25A reactive factory for the filters.
26β
27<a id="filters-properties"></a>
28β
29#### `filters` properties
30β
31| Property | Type | Default value | Description |
32| ------ | ------ | ------ | ------ |
33| <a id="filters-property-exact"></a> `exact?` | `boolean` | `undefined` | Match query key exactly |
34| <a id="filters-property-fetchstatus"></a> `fetchStatus?` | `"fetching"` \| `"paused"` \| `"idle"` | `undefined` | Include queries matching their fetchStatus |
35| <a id="filters-property-predicate"></a> `predicate?` | (`query`: [`Query`](../classes/Query.md)) => `boolean` | `undefined` | Include queries matching this predicate function |
36| <a id="filters-property-querykey"></a> `queryKey?` | `TQueryKey` \| `TuplePrefixes`\<`TQueryKey`\> | `undefined` | Include queries matching this query key |
37| <a id="filters-property-stale"></a> `stale?` | `boolean` | `undefined` | Include or exclude stale queries |
38| <a id="filters-property-type"></a> `type?` | `QueryTypeFilter` | `'all'` | Filter to active queries, inactive queries or all queries |
39β
40## Returns
41β
42`Signal`\<`number`\>
43β
44signal with number of loading or fetching queries.