Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

injectisfetching.md

35 lines742 Bytes

1---
2id: injectIsFetching
3title: injectIsFetching
4---
5​
6# Function: injectIsFetching()
7​
8```ts
9function injectIsFetching(filters?, injector?): Signal<number>
10```
11​
12Injects a signal that tracks the number of queries that your application is loading or
13fetching in the background.
14​
15Can be used for app-wide loading indicators
16​
17## Parameters
18​
19β€’ **filters?**: `QueryFilters`
20​
21The filters to apply to the query.
22​
23β€’ **injector?**: `Injector`
24​
25The Angular injector to use.
26​
27## Returns
28​
29`Signal`\<`number`\>
30​
31signal with number of loading or fetching queries.
32​
33## Defined in
34​
35[inject-is-fetching.ts:17](https://github.com/TanStack/query/blob/dac5da5416b82b0be38a8fb34dde1fc6670f0a59/packages/angular-query-experimental/src/inject-is-fetching.ts#L17)