Interface

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 HttpCondition

Properties

NameTypeDescription
type "http"-
http HttpRequestConfigHTTP request configuration
responseExpression ?string

Expression to extract boolean from response (scope: { response }). e.g. 'response.allowed', 'response.permissions.canEdit' When omitted, the entire response is coerced to boolean: !!response

pendingValue ?boolean

Value to return while the HTTP request is in-flight.

Choose based on the logic type and desired UX: - For hidden: false = visible while loading, true = hidden while loading - For disabled: false = enabled while loading, true = disabled while loading - For required: false = optional while loading, true = required while loading

cacheDurationMs ?numberCache duration in ms for HTTP responses. @default 30000
debounceMs ?numberDebounce time in milliseconds for re-evaluation when dependent form values change.