HttpCondition
@ng-forge/dynamic-forms
Condition that evaluates based on an HTTP response from a remote server.
The HTTP request is resolved reactively — when dependent form values change, the request is re-evaluated (with debouncing). The result is cached per resolved request to avoid redundant network calls.
Since LogicFn must return boolean synchronously, this condition uses
a signal-based async resolution pattern internally.
@public
Signature
interface HttpConditionProperties
| Name | Type | Description |
|---|---|---|
type | "http" | - |
http | HttpRequestConfig | HTTP request configuration |
responseExpression ? | string | Expression to extract boolean from response (scope: |
pendingValue ? | boolean | Value to return while the HTTP request is in-flight. Choose based on the logic type and desired UX:
- For |
cacheDurationMs ? | number | Cache duration in ms for HTTP responses. @default 30000 |
debounceMs ? | number | Debounce time in milliseconds for re-evaluation when dependent form values change. |
packages/dynamic-forms/src/lib/models/expressions/conditional-expression.ts:73