Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

index.ts

22 lines681 Bytes

1import '@angular/compiler'
2import 'zone.js'
3import { provideHttpClient, withFetch } from '@angular/common/http'
4import { bootstrapApplication } from '@angular/platform-browser'
5import { provideAngularQuery } from '@tanstack/angular-query-experimental'
6import { QueryClient } from '@tanstack/angular-query-experimental'
7import { BasicExampleComponent } from './basic-example.component'
8​
9bootstrapApplication(BasicExampleComponent, {
10 providers: [
11 provideHttpClient(withFetch()),
12 provideAngularQuery(
13 new QueryClient({
14 defaultOptions: {
15 queries: {
16 gcTime: 1000 * 60 * 60 * 24, // 24 hours
17 },
18 },
19 }),
20 ),
21 ],
22})