store.findAll()
Fetches all records of a type, returning a live, updating array.
Syntax
store.findAll(type, options?): Promise<RecordArray> Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | No | The model name. |
options | object | No | Options like reload and include. |
Returns
Promise<RecordArray> — Resolves to a live record array.
Examples
import Route from '@ember/routing/route';
import { service } from '@ember/service';
export default class PostsRoute extends Route {
@service store;
model() {
return this.store.findAll('post', { reload: true });
}
}
Notes
The returned array is live: it updates as matching records enter the
store. findAll requests all records (no filtering); use query() for
server-side filtering or pagination.