Sets/gets whether the "igx-input-group__input"
class is added to the host element.
Default value is false
.
this.igxInput.isInput = true;
let isCLassAdded = this.igxInput.isInput;
Sets/gets whether the "class.igx-input-group__textarea"
class is added to the host element.
Default value is false
.
this.igxInput.isTextArea = true;
let isCLassAdded = this.igxInput.isTextArea;
Gets the disabled
property
@ViewChild('igxInput', {read: IgxInputDirective})
public igxInput: IgxInputDirective;
let isDisabled = this.igxInput.disabled;
Sets the disabled
property.
<input-group>
<input igxInput #igxInput [disabled]="true">
</input-group>
Gets whether the igxInput is focused.
let isFocused = this.igxInput.focused;
Gets whether the igxInput has a placeholder.
let hasPlaceholder = this.igxInput.hasPlaceholder;
Gets whether the igxInput is valid.
let valid = this.igxInput.isValid;
Gets the nativeElement
of the igxInput.
let igxInputNativeElement = this.igxInput.nativeElement;
Gets the placeholder element of the igxInput.
let igxInputPlaceholder = this.igxInput.placeholder;
Gets whether the igxInput is required.
let isRequired = this.igxInput.required;
Sets the required
property.
<input-group>
<input igxInput #igxInput required>
</input-group>
Gets the state of the igxInput.
let igxInputState = this.igxInput.valid;
Sets the state of the igxInput.
this.igxInput.valid = IgxInputState.INVALID;
Gets the value
property.
@ViewChild('igxInput', {read: IgxInputDirective})
public igxInput: IgxInputDirective;
let inputValue = this.igxInput.value;
Sets the value
property.
<input-group>
<input igxInput #igxInput [value]="'IgxInput Value'">
</input-group>
The
igxInput
directive creates single- or multiline text elements, covering common scenarios when dealing with form inputs.Igx Module
IgxInputGroupModule
Igx Parent
Data Entry & Display
Igx Theme
igx-input-group-theme
Igx Keywords
input, input group, form, field, validation
Igx Group
presentation
Example