CngxInput
[cngxInput]
projects/forms/input/input.directive.ts
Import#
import { CngxInput } from '@cngx/forms/input'
Description#
Applies ARIA attributes and focus tracking to a native input, textarea, or select
inside a cngx-form-field.
Provides CNGX_FORM_FIELD_CONTROL so the parent form field can discover it.
Works standalone (without cngx-form-field) as a no-op - no crash.
<input cngxInput />Metadata#
Host#
Providers#
CNGX_FORM_FIELD_CONTROL- useExisting
CngxInput
Relationships
Index#
Methods
Inputs
Derived State
HostBindings
Inputs#
string | undefinedExplicit autocomplete value. When not set, inferred from the field name
(e.g. email → autocomplete="email", password → autocomplete="current-password").
Set to 'off' to disable.
boolean | undefinedExplicit spellcheck value. When not set, auto-disabled for fields like email, password, URL, phone, codes.
Instance Properties#
Methods#
HostBindings#
| Binding | Expression |
|---|---|
[id] | inputId() |
[attr.aria-describedby] | describedBy() |
[attr.aria-labelledby] | labelledBy() |
[attr.aria-invalid] | ariaInvalid() |
[attr.aria-required] | ariaRequired() |
[attr.aria-busy] | ariaBusy() |
[attr.aria-errormessage] | ariaErrorMessage() |
[attr.aria-readonly] | ariaReadonly() |
[attr.disabled] | isDisabled() |
[attr.autocomplete] | resolvedAutocomplete() |
[attr.spellcheck] | resolvedSpellcheck() |
[class.cngx-input--error] | errorState() |
[class.cngx-input--focused] | focused() |
HostListeners#
| Event | Handler |
|---|---|
(focus) | focus() |
(blur) | blur() |
(input) | input() |