Simple and configurable query helpers.
@Component({
selector: 'query-state-detail',
template: `
<query-state-template [queryState]="queryState.data$">
<ng-template
[qsIdle]="queryState.data$"
let-detail
let-revalidating="revalidating"
>
<pre>{{ detail | json }}</pre>
</ng-template>
</query-state-template>
`,
imports: [JsonPipe, AsyncPipe, QueryStateTemplateComponent],
standalone: true,
})
export class DetailComponent {
queryState = injectQueryState();
}
Helpers to automatically fetch and revalidate query data. Template helpers to show the query state and response.
- Caching
- Request state
- Retries (with configuration)
- Revalidate on interval, focus, online detection
- Configurable default templates
- Prefetch
- BroadcastChannel