useRepositoryQuery()
function useRepositoryQuery<T, TOptions, RT>(
EntityType,
method,
defaultValue,
options): RxDBResource<RT>;
Defined in: hooks.ts:35
将实体仓库的 Observable 查询转换为惰性 Angular Signal 资源。
Type Parameters
| Type Parameter |
|---|
T extends EntityType |
TOptions |
RT |
Parameters
| Parameter | Type | Description |
|---|---|---|
EntityType | T | 实体类型 |
method | string | 仓库静态查询方法名 |
defaultValue | RT | 首次订阅前的默认值 |
options | UseOptions<TOptions> | 查询参数或返回查询参数的响应式函数 |
Returns
RxDBResource<RT>
查询值、错误与加载状态 signals