Skip to content

Commit

Permalink
fixed issue in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Wilson committed Mar 11, 2013
1 parent 9988098 commit 8ea517a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ app.controller('Example5Ctrl', function ($scope) {

* AngularJS (http://angularjs.org)
* JQuery (http://jquery.org)

## Usage

Add to your html file
Expand All @@ -85,7 +86,7 @@ Create a basic form with a file input element

### Some rule of thumb

* Any html element that supports the click event can be used to submit the form marked with the __ng-upload__ directive, as long as such elements are marked with the 'upload-submit' directive.
* Any html element that supports the click event can be used to submit the form marked with the __ng-upload__ directive, as long as such elements are marked with the __'upload-submit'__ directive.
* Make sure you import the __'ngUpload'__ module in your angularJS application.

Applying this rules, the sample above can be re-written as
Expand All @@ -95,8 +96,7 @@ Applying this rules, the sample above can be re-written as
<div ng-controller="mainCtrl">
<form action="/uploads" ng-upload>
<input type="file" name="avatar"></input>
<div style='cursor: pointer' upload-submit="results(contents, completed)">Upload with Div</div> &bull;
<a class='upload-submit' href='javascript:void(0)'>Upload with Anchor</a>
<div style='cursor: pointer' upload-submit="results(content, completed)">Upload with Div</div> &bull;
</form>
</div>
</div>
Expand All @@ -109,7 +109,9 @@ or
<div ng-controller="mainCtrl">
<form action="/uploads" ng-upload>
<input type="file" name="avatar"></input>
<a href='javascript:void(0)' upload-submit="results(contents, completed)">Upload with Anchor</a>
<a href='javascript:void(0)'
class="upload-submit: results(contents, completed)" >
Upload with Anchor</a>
</form>
</div>
</div>
Expand Down

0 comments on commit 8ea517a

Please sign in to comment.