Skip to content

Commit

Permalink
Updated readme to include instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
chesleybrown committed Jan 7, 2014
1 parent 434e052 commit b43d2e2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,21 @@ autofill-directive
==================

AngularJS directive that fixes the issue where browsers autofill inputs and they aren't reflective in the model upon submit.

## Install

Use `bower install autofill-directive`

Include in your javascript using require such as `require('autofill-directive')(app);`

## Usage

Use the `autofill-submit` directive on the form that you are submitting and provide the angular expression you want executed. Then place the `autofill` directive on any inputs that may be autofilled by the browser. Now the `model` will be updated to reflect what the browser has autofilled into the input BEFORE the submit expression is executed.

```html
<form autofill-submit="login()">
<input autofill ng-model="username" placeholder="Username" type="text" />
<input autofill ng-model="password" placeholder="Password" type="password" />
<input type="submit" value="Login" />
</form>
```

0 comments on commit b43d2e2

Please sign in to comment.