ng-focus-if

WebJar for ng-focus-if

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

ng-focus-if
Последняя версия

Последняя версия

1.0.4
Дата

Дата

Тип

Тип

jar
Описание

Описание

ng-focus-if
WebJar for ng-focus-if
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/hiebj/ng-focus-if

Скачать ng-focus-if

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/ng-focus-if/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>ng-focus-if</artifactId>
    <version>1.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/ng-focus-if/
implementation 'org.webjars.bower:ng-focus-if:1.0.4'
// https://jarcasting.com/artifacts/org.webjars.bower/ng-focus-if/
implementation ("org.webjars.bower:ng-focus-if:1.0.4")
'org.webjars.bower:ng-focus-if:jar:1.0.4'
<dependency org="org.webjars.bower" name="ng-focus-if" rev="1.0.4">
  <artifact name="ng-focus-if" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='ng-focus-if', version='1.0.4')
)
libraryDependencies += "org.webjars.bower" % "ng-focus-if" % "1.0.4"
[org.webjars.bower/ng-focus-if "1.0.4"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

ng-focus-if

Bower version NPM version Downloads devDependency Status GitHub stars

An attribute directive that will trigger focus on an element under specified conditions. It can also be used as a cross-browser replacement for the autofocus attribute.

View a live demo on Plnkr.

It is available through NPM:

npm install ng-focus-if

Or, via bower:

bower install ng-focus-if --save

Usage

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

angular  
    .module('App', [  
        'focus-if',  
        ... // other dependencies  
    ]);

To immediately focus an element upon rendering (similar to input autofocus):

<input focus-if />

To focus an element when a specified Angular expression becomes truthy:

<input focus-if="focusInput" />

To focus an element after a specified delay upon rendering:

<input focus-if focus-delay="500" />

To focus an element after a specified delay when a specified Angular expression becomes truthy:

<input focus-if="focusInput" focus-delay="500" />

Caveat: apply focus multiple times

Like any other Angular directive using a $watch callback, this directive depends on Angular's model change detection, which can cause trouble when trying to apply focus more than once. Users looking to apply focus to a given element multiple times may find this thread useful.

Версии библиотеки

Версия
1.0.4
1.0.2