Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

This package has been deprecated

Author message:

package renamed to ng-focus-if

ng-autofocus

0.0.23 • Public • Published

This package is deprecated!

Please use the newer ng-focus-if instead!


Usage

Include autofocus.min.js in your build or directly with a <script> tag and require the module in your module definition:

angular  
    .module('App', [  
        'autofocus',  
        ... // other dependencies  
    ]);

To immediately focus an element upon rendering:

<input autofocus />

To focus an element when a specified conditional $scope property becomes truthy:

<input autofocus="focusInput" />

To focus an element after a specified delay upon rendering:

<input autofocus autofocus-delay="500" />

To focus an element after a specified delay when a specified conditional $scope property becomes truthy:

<input autofocus="focusInput" autofocus-delay="500" />

Install

npm i ng-autofocus

DownloadsWeekly Downloads

58

Version

0.0.23

License

none

Last publish

Collaborators

  • avatar