Class IgxInputDirective

Hierarchy

  • IgxInputDirective

Implements

  • AfterViewInit
  • OnDestroy

Constructors

constructor

  • new IgxInputDirective(inputGroup: IgxInputGroupBase, ngModel: NgModel, formControl: FormControlName, element: ElementRef, cdr: ChangeDetectorRef): IgxInputDirective

Properties

inputGroup

inputGroup: IgxInputGroupBase

isInput

isInput: boolean = false

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;
memberof

IgxInputDirective

isTextArea

isTextArea: boolean = false

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;
memberof

IgxInputDirective

Accessors

disabled

  • get disabled(): boolean
  • set disabled(value: boolean): void
  • Gets the disabled property

    @ViewChild('igxInput', {read: IgxInputDirective})
     public igxInput: IgxInputDirective;
    let isDisabled = this.igxInput.disabled;
    memberof

    IgxInputDirective

    Returns boolean

  • Sets the disabled property.

    <input-group>
     <input igxInput #igxInput [disabled]="true">
    </input-group>
    memberof

    IgxInputDirective

    Parameters

    • value: boolean

    Returns void

focused

  • get focused(): boolean

hasPlaceholder

  • get hasPlaceholder(): any

isValid

  • get isValid(): boolean

nativeElement

  • get nativeElement(): any

placeholder

  • get placeholder(): any

required

  • get required(): boolean
  • set required(value: boolean): void

valid

value

  • get value(): any
  • set value(value: any): void
  • Gets the value propery.

    @ViewChild('igxInput', {read: IgxInputDirective})
     public igxInput: IgxInputDirective;
    let inputValue = this.igxInput.value;
    memberof

    IgxInputDirective

    Returns any

  • Sets the value property.

    <input-group>
     <input igxInput #igxInput [value]="'IgxInput Value'">
    </input-group>
    memberof

    IgxInputDirective

    Parameters

    • value: any

    Returns void

Methods

focus

  • focus(): void