Skip to content

Commit

Permalink
docs(angular-query): Update quick-start.md (TanStack#6775)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
michaelbe812 and lachlancollins authored Jan 27, 2024
1 parent 1f77c12 commit e726e69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/framework/angular/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ If you're looking for a fully functioning example, please have a look at our [ba
### Provide the client to your App

```ts
import {provideHttpClient} from '@angular/common/http';
import {provideAngularQuery, QueryClient} from '@tanstack/angular-query-experimental'

bootstrapApplication(AppComponent, {
providers: [provideAngularQuery(new QueryClient())],
providers: [provideHttpClient(), provideAngularQuery(new QueryClient())],
})
```

Expand Down Expand Up @@ -45,6 +48,7 @@ import {
`,
})
export class TodosComponent {
todoService = inject(TodoService)
queryClient = injectQueryClient()

query = injectQuery(() => ({
Expand Down

0 comments on commit e726e69

Please sign in to comment.