Cookbooks / httpResource
This page uses Angular resource() against in-memory data so the docs site prerenders without a backend. In your app, swap the in-memory loader for Angular httpResource keyed off a query signal. The same signals drive data-table, combobox, and virtual-scroll.
Replace the in-memory resource() loader with httpResource (JSON) or rxResource if the source is already an Observable.
readonly query = signal('');
readonly users = httpResource(() => `/api/users?q=${this.query()}`);readonly users = rxResource({
params: () => this.query(),
stream: ({ params }) => this.http.get<User[]>('/api/users', { params: { q: params } }),
}); Type to debounce the query, then page and sort. serverSide keeps slicing on the resource, not in the table.
ID | Name | Email | Role |
|---|---|---|---|
| 1 | User 1 | [email protected] | Admin |
| 2 | User 2 | [email protected] | Editor |
| 3 | User 3 | [email protected] | Viewer |
| 4 | User 4 | [email protected] | Admin |
| 5 | User 5 | [email protected] | Editor |
| 6 | User 6 | [email protected] | Viewer |
| 7 | User 7 | [email protected] | Admin |
| 8 | User 8 | [email protected] | Editor |
filterMode="none" plus queryChange — options come from the resource.
Bind [items] to the filtered list. Only visible rows stay in the DOM.