View source Improve this doc

# `ngFocus`
directive in module `ng`

## Description

Specify custom behavior on focus event.

## Usage

as attribute

    <window, input, select, textarea, a ng-focus="{expression}">
       ...
    </window, input, select, textarea, a>

as class

    <window, input, select, textarea, a class="ng-focus: {expression};">
       ...
    </window, input, select, textarea, a>

#### Parameters

Param | Type | Details
--- | --- | ---
ngFocus | expression | Expression to evaluate upon focus. (Event object is available as `$event`)

## Example

See `ngClick`