Skip to main content
Angular Query provides first-class support for Angular applications using Angular’s modern signals API. It enables you to fetch, cache, and update asynchronous data with zero configuration while maintaining full type safety.
Angular Query is currently in experimental stage. Breaking changes may occur in minor and patch releases. Lock your version to a patch-level version if using in production.

What is Angular Query?

Angular Query is the Angular adapter for TanStack Query. It brings powerful and flexible server state management to Angular applications through a signal-based API that integrates seamlessly with Angular’s reactivity system.

Key Features

Signal-Based Reactivity

Built on Angular signals for automatic reactivity and change detection

Automatic Caching

Smart caching with automatic refetching, deduplication, and garbage collection

Type Safety

Full TypeScript support with type inference from query functions

Developer Tools

Built-in devtools for debugging and monitoring queries

Core Concepts

Queries

Queries are declarative dependencies on asynchronous data sources. They automatically manage loading states, errors, and data updates:

Mutations

Mutations are used for creating, updating, or deleting data:

Signal Reactivity

Angular Query leverages Angular’s signals for automatic reactivity. The function passed to injectQuery runs in a reactive context, similar to Angular’s computed:
When the filter signal changes, the query automatically updates with the new key and refetches data.

Requirements

Angular Query requires:
  • Angular 16 or higher - Uses modern Angular features including signals
  • TypeScript 5.0+ - Full type inference and type safety
  • @tanstack/query-core - Core query functionality (installed automatically)

Why Angular Query?

Before Angular Query

With Angular Query

Angular Query handles:
  • Loading and error states automatically
  • Automatic cleanup on component destroy
  • Smart caching and refetching
  • Request deduplication
  • Background updates
  • Automatic garbage collection

Injection Context

All Angular Query hooks must be called within an injection context:

Next Steps

Installation

Install and configure Angular Query in your project

Quick Start

Build your first query in minutes

DevTools

Debug and monitor your queries visually

Guides

Deep dive into queries, mutations, and more

Community

Join the TanStack Discord community to get help, share feedback, and connect with other developers using Angular Query.