devtools/docs/framework/angular/basic-setup.md
Alem Tuzlak 0803d09382
docs: install the framework adapters as dev dependencies everywhere (#547)
The installation page and most of the quick start used `npm install -D`,
but the adapter pages, the basic setup pages, and the Svelte and Angular
quick start used a regular install. Every adapter install now uses -D, and
the installation page says when to use a regular dependency instead.

Fixes #227
2026-10-29 16:17:48 +01:00

1.8 KiB

title id
Basic setup basic-setup

TanStack Devtools provides you with an easy-to-use and modular client that allows you to compose multiple devtools into one easy-to-use panel.

Setup

Install the TanStack Devtools library. This will install the devtools core as well as provide you with the Angular-specific adapter.

npm i -D @tanstack/angular-devtools

Next, in the root of your application, import the TanStackDevtoolsComponent from @tanstack/angular-devtools and add it to your template.

import { Component } from '@angular/core'
import { TanStackDevtoolsComponent } from '@tanstack/angular-devtools'

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [TanStackDevtools],
  template: `
    <app-content />
    <tanstack-devtools />
  `,
})
export class App {}

Import the desired devtools and provide them to the TanStackDevtools via the [plugins] input along with a label for the menu.

import { Component } from '@angular/core'
import { TanStackDevtools } from '@tanstack/angular-devtools'
import type { TanStackDevtoolsAngularPlugin } from '@tanstack/angular-devtools'
import { AngularQueryDevtoolsPanel } from '@tanstack/angular-query-devtools'

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [TanStackDevtools],
  template: `
    <app-content />
    <tanstack-devtools [plugins]="plugins" />
  `,
})
export class AppComponent {
  plugins: Array<TanStackDevtoolsAngularPlugin> = [
    {
      name: 'Angular Query',
      render: AngularQueryDevtoolsPanel,
    },
  ]
}

Finally, add any additional configuration you desire to the TanStackDevtools. More information can be found under the TanStack Devtools Configuration section.