Skip to content

Commit e726e69

Browse files
docs(angular-query): Update quick-start.md (#6775)
* angular-query: Update quick-start.md Some minor fixes to update the quick start example to a version which would actually compile * docs(angular-query): add QueryClient import --------- Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
1 parent 1f77c12 commit e726e69

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/framework/angular/quick-start.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ If you're looking for a fully functioning example, please have a look at our [ba
1212
### Provide the client to your App
1313

1414
```ts
15+
import {provideHttpClient} from '@angular/common/http';
16+
import {provideAngularQuery, QueryClient} from '@tanstack/angular-query-experimental'
17+
1518
bootstrapApplication(AppComponent, {
16-
providers: [provideAngularQuery(new QueryClient())],
19+
providers: [provideHttpClient(), provideAngularQuery(new QueryClient())],
1720
})
1821
```
1922

@@ -45,6 +48,7 @@ import {
4548
`,
4649
})
4750
export class TodosComponent {
51+
todoService = inject(TodoService)
4852
queryClient = injectQueryClient()
4953

5054
query = injectQuery(() => ({

0 commit comments

Comments
 (0)