AutoFocusDirective class

The element will be focused as soon as directive is initialized.

Please put only on content that appears after user action and requires focus to be changed to it.

Inheritance
Annotations
  • @Directive(selector: '[autoFocus]')

Constructors

AutoFocusDirective(HtmlElement node, DomService _domService, @Self() @Optional() Focusable? _focusable, @Optional() ModalComponent? _modal, @Optional() PopupRef? _popupRef)

Properties

autoFocus bool?
Enables the auto focus directive so that it can be conditionally applied.
no getter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes this disposable and any resources it has open.
inherited
focus() → void
Item/component focuses itself
override
ngOnDestroy() → void
Executed before the directive is removed from the DOM and destroyed.
ngOnInit() → void
Executed after the first change detection run for a directive.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited