Open History to see the last commit
function injectIsFetching(filters?: () => QueryFilters): Signal<number>;
Defined in: packages/angular-query/src/inject-is-fetching.ts:15
Injects a signal that tracks the number of queries that your application is loading or fetching in the background (useful for app-wide loading indicators).
Can be used for app-wide loading indicators.
Parameters#
filters?#
() => QueryFilters
A reactive factory for the filters.
filters properties#
| Property | Type | Default value | Description |
|---|---|---|---|
exact? | boolean | undefined | Match query key exactly |
fetchStatus? | "fetching" | "paused" | "idle" | undefined | Include queries matching their fetchStatus |
predicate? | (query: Query) => boolean | undefined | Include queries matching this predicate function |
queryKey? | TQueryKey | TuplePrefixes<TQueryKey> | undefined | Include queries matching this query key |
stale? | boolean | undefined | Include or exclude stale queries |
type? | QueryTypeFilter | 'all' | Filter to active queries, inactive queries or all queries |
Returns#
Signal<number>
signal with number of loading or fetching queries.