https://github.com/ianmurrays/ngautofocus
Makes the autofocus attribute work with angular
https://github.com/ianmurrays/ngautofocus
angular angularjs
Last synced: 9 months ago
JSON representation
Makes the autofocus attribute work with angular
- Host: GitHub
- URL: https://github.com/ianmurrays/ngautofocus
- Owner: ianmurrays
- Created: 2015-08-06T18:43:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-10T13:11:53.000Z (over 9 years ago)
- Last Synced: 2025-09-13T10:24:07.396Z (9 months ago)
- Topics: angular, angularjs
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular Autofocus
An extremely simple directive to autofocus input fields in angular. Due to how views are rendered in angular, the autofocus directive doesn't always work. This directive makes sure fields are focused after being rendered.
## How to use
Install:
```shell
bower install --save ngAutofocus
```
Add the module to your app:
```javascript
angular.module('myApp', ['ngAutofocus']);
```
Use the autofocus attribute like you've always done:
```html
```
## Minimizing
Closure Compiler is used to minimize the code. It is minimized using this command
```bash
closure-compiler --js_output_file=angular-autofocus.min.js --compilation_level SIMPLE angular-autofocus.js
```
Advanced optimizations are not used because as of now the AngularJS codebase does not support it.
## Issues
Please file issues using GitHub's issue tracker.
## Contributing
Pull requests are more than welcome!