diff --git a/docs/config.json b/docs/config.json
index ad0177b53c..ffe9ec23a4 100644
--- a/docs/config.json
+++ b/docs/config.json
@@ -1043,7 +1043,7 @@
"to": "framework/angular/examples/pagination"
},
{
- "label": "Infinite query with Max pages",
+ "label": "Infinite query with maxPages",
"to": "framework/angular/examples/infinite-query-with-max-pages"
},
{
@@ -1057,6 +1057,10 @@
{
"label": "Query options from a service",
"to": "framework/angular/examples/query-options-from-a-service"
+ },
+ {
+ "label": "Devtools embedded panel",
+ "to": "framework/angular/examples/devtools-panel"
}
]
}
diff --git a/examples/angular/devtools-panel/src/app/app.config.ts b/examples/angular/devtools-panel/src/app/app.config.ts
index c5b827e588..b51d14cb81 100644
--- a/examples/angular/devtools-panel/src/app/app.config.ts
+++ b/examples/angular/devtools-panel/src/app/app.config.ts
@@ -1,10 +1,17 @@
import { provideHttpClient, withFetch } from '@angular/common/http'
import { provideRouter } from '@angular/router'
+import {
+ QueryClient,
+ provideTanStackQuery,
+} from '@tanstack/angular-query-experimental'
import { routes } from './app.routes'
import type { ApplicationConfig } from '@angular/core'
export const appConfig: ApplicationConfig = {
- // In this example, `provideTanStackQuery` is used in the router
- providers: [provideHttpClient(withFetch()), provideRouter(routes)],
+ providers: [
+ provideHttpClient(withFetch()),
+ provideRouter(routes),
+ provideTanStackQuery(new QueryClient()),
+ ],
}
diff --git a/examples/angular/devtools-panel/src/app/app.routes.ts b/examples/angular/devtools-panel/src/app/app.routes.ts
index b423235506..2b1b1e6765 100644
--- a/examples/angular/devtools-panel/src/app/app.routes.ts
+++ b/examples/angular/devtools-panel/src/app/app.routes.ts
@@ -1,7 +1,3 @@
-import {
- QueryClient,
- provideTanStackQuery,
-} from '@tanstack/angular-query-experimental'
import type { Route } from '@angular/router'
export const routes: Array = [
@@ -14,12 +10,10 @@ export const routes: Array = [
path: 'basic',
loadComponent: () =>
import('./components/basic-devtools-panel-example.component'),
- providers: [provideTanStackQuery(new QueryClient())],
},
{
path: 'lazy',
loadComponent: () =>
import('./components/lazy-load-devtools-panel-example.component'),
- providers: [provideTanStackQuery(new QueryClient())],
},
]
diff --git a/examples/angular/devtools-panel/src/app/components/basic-devtools-panel-example.component.ts b/examples/angular/devtools-panel/src/app/components/basic-devtools-panel-example.component.ts
index c3fcbbead0..e54fc1b2d7 100644
--- a/examples/angular/devtools-panel/src/app/components/basic-devtools-panel-example.component.ts
+++ b/examples/angular/devtools-panel/src/app/components/basic-devtools-panel-example.component.ts
@@ -1,9 +1,4 @@
-import {
- ChangeDetectionStrategy,
- Component,
- signal,
- viewChild,
-} from '@angular/core'
+import { ChangeDetectionStrategy, Component, viewChild } from '@angular/core'
import { injectDevtoolsPanel } from '@tanstack/angular-query-devtools-experimental'
import { ExampleQueryComponent } from './example-query.component'
import type { ElementRef } from '@angular/core'
@@ -19,24 +14,19 @@ import type { ElementRef } from '@angular/core'
In this example, the devtools panel is loaded programmatically when the
button is clicked
-