Skip to content

Commit 2588a08

Browse files
authored
docs(angular-query): fix angular examples (#8335)
1 parent 3888f23 commit 2588a08

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

examples/angular/devtools-panel/src/app/app.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { provideRouter } from '@angular/router'
44
import {
55
QueryClient,
66
provideTanStackQuery,
7+
withDevtools,
78
} from '@tanstack/angular-query-experimental'
89
import { routes } from './app.routes'
910
import type { ApplicationConfig } from '@angular/core'
@@ -12,6 +13,6 @@ export const appConfig: ApplicationConfig = {
1213
providers: [
1314
provideHttpClient(withFetch()),
1415
provideRouter(routes),
15-
provideTanStackQuery(new QueryClient()),
16+
provideTanStackQuery(new QueryClient(), withDevtools()),
1617
],
1718
}

examples/angular/query-options-from-a-service/src/app/app.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { provideRouter, withComponentInputBinding } from '@angular/router'
33
import {
44
QueryClient,
55
provideTanStackQuery,
6+
withDevtools,
67
} from '@tanstack/angular-query-experimental'
78

89
import { routes } from './app.routes'
@@ -12,6 +13,6 @@ export const appConfig: ApplicationConfig = {
1213
providers: [
1314
provideHttpClient(withFetch()),
1415
provideRouter(routes, withComponentInputBinding()),
15-
provideTanStackQuery(new QueryClient()),
16+
provideTanStackQuery(new QueryClient(), withDevtools()),
1617
],
1718
}

examples/angular/rxjs/src/app/app.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
import {
77
QueryClient,
88
provideTanStackQuery,
9+
withDevtools,
910
} from '@tanstack/angular-query-experimental'
1011
import { autocompleteMockInterceptor } from './api/autocomplete-mock.interceptor'
1112
import type { ApplicationConfig } from '@angular/core'
@@ -24,6 +25,7 @@ export const appConfig: ApplicationConfig = {
2425
},
2526
},
2627
}),
28+
withDevtools(),
2729
),
2830
],
2931
}

examples/angular/rxjs/src/app/services/autocomplete-service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@ export class AutocompleteService {
1414
getSuggestions = (term: string = '') =>
1515
term.trim() === ''
1616
? of({ suggestions: [] })
17-
: this.#http.get<Response>(`/api/autocomplete?term=${term}`)
17+
: this.#http.get<Response>(
18+
`/api/autocomplete?term=${encodeURIComponent(term)}`,
19+
)
1820
}

0 commit comments

Comments
 (0)