# ng-focus-on

> An angular directive for easy programmatic focusing on form elements

Latest version **0.2.2** (published 2014-07-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-focus-on
pnpm add ng-focus-on
yarn add ng-focus-on
bun add ng-focus-on
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2014-07-14 |
| First published | 2013-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 49 |
| Author | Max Edmands |
| Maintainers | demands |
| Keywords | angularjs, focus, focus-on |

## Links

- npm: https://www.npmjs.com/package/ng-focus-on
- Repository: https://github.com/goodeggs/ng-focus-on
- Issues: https://github.com/goodeggs/ng-focus-on/issues
- npm.io page: https://npm.io/package/ng-focus-on

## Recent versions

- 0.2.2 (latest) — 2014-07-14
- 0.2.0 — 2013-12-17
- 0.1.0 — 2013-12-17

## README

# ng-focus-on

An [angularjs](http://angularjs.org/) directive and corresponding factory to make elements focusable. It's easy!

```html
<div ng-controller="AwesomeCtrl">
  <a href="#" ng-click="focusAwesome($event)">Focus on something awesome</a>
  <input focus-on="awesome">
</div>
```

```javascript
function AwesomeCtrl($scope, focus) {
  $scope.focusAwesome = function($event) {
    $event.preventDefault();
    focus('awesome');
  };
}
```

## Installing

- **Bower**: `bower install ng-focus-on`
- **[npm/browserify](http://browserify.org/)**: `npm install ng-focus-on`
- **Download**: https://github.com/goodeggs/ng-focus-on/releases/latest

## Credit

Thanks to this answer from [blesh](http://stackoverflow.com/users/135786/blesh) on StackOverflow for inspiration: http://stackoverflow.com/a/18295416/298584

## Contributing

```bash
npm install
npm test
```

## License

MIT.

---
_Source: https://npm.io/package/ng-focus-on · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
