UNPKG

igniteui-angular

Version:

Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps

57 lines (56 loc) 1.85 kB
import { ElementRef } from '@angular/core'; import * as i0 from "@angular/core"; export declare class IgxFocusDirective { private element; private comp?; private control?; private focusState; /** * Returns the state of the igxFocus. * ```typescript * @ViewChild('focusContainer', {read: IgxFocusDirective}) * public igxFocus: IgxFocusDirective; * let isFocusOn = this.igxFocus.focused; * ``` * * @memberof IgxFocusDirective */ get focused(): boolean; /** * Sets the state of the igxFocus. * ```html * <igx-input-group > * <input #focusContainer igxInput [igxFocus]="true"/> * </igx-input-group> * ``` * * @memberof IgxFocusDirective */ set focused(val: boolean); /** * Gets the native element of the igxFocus. * ```typescript * @ViewChild('focusContainer', {read: IgxFocusDirective}) * public igxFocus: IgxFocusDirective; * let igxFocusNativeElement = this.igxFocus.nativeElement; * ``` * * @memberof IgxFocusDirective */ get nativeElement(): any; constructor(element: ElementRef, comp?: any[], control?: any[]); /** * Triggers the igxFocus state. * ```typescript * @ViewChild('focusContainer', {read: IgxFocusDirective}) * public igxFocus: IgxFocusDirective; * this.igxFocus.trigger(); * ``` * * @memberof IgxFocusDirective */ trigger(): void; static ɵfac: i0.ɵɵFactoryDeclaration<IgxFocusDirective, [null, { optional: true; self: true; }, { optional: true; self: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<IgxFocusDirective, "[igxFocus]", ["igxFocus"], { "focused": { "alias": "igxFocus"; "required": false; }; }, {}, never, never, true, never>; static ngAcceptInputType_focused: unknown; }