* 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. If you use an input element with a type of submit then you do not have to mark it with upload-submit.
* Make sure you import the __'ngUpload'__ module in your angularJS application.
Applying this rules, the sample above can be re-written as
*`upload-options-enable-rails-csrf`: Turns on support for [Rails' CSRF](http://guides.rubyonrails.org/security.html#cross-site-request-forgery-csrf)
by adding a hidden form field with the csrf token.
*`upload-options-before-submit`: function that gets triggered before the upload starts and if the function returns false it will cancel the submit.
### uploadSubmit
*`upload-options-convert-hidden`: Set the value of hidden inputs to their `ng-model` attribute when the form is submitted. One situation in which this is useful is when
using select elements whose options are generated with ngOptions, for
example:
```
select[name='category_id' ng-model='category' ng-options='c.id as c.name for c in categories']
```
and where categories is
```
[{id: 12, name: 'fred'}, {id: 65, name: 'wilma'}]
```
Because Angular will generate options whose HTML element value is indexed on 0, the value submitted will be the value of the
option and not the desired ng-model value which is category.id. Adding
a hidden element whose ng-model matches the ng-model of the select
element, combined with
upload-options-convert-hidden='true' will workaround this issue.
## Example
Example of forms that posts to NodeJS server are now included under the [/examples](https://github.com/twilson63/ngUpload/tree/master/examples) folder.
## Test
Needs Chrome Installed.
``` sh
npm install
npm install grunt-cli -g
npm test
```
## jshint
``` sh
npm install
npm install grunt-cli -g
grunt jshint
```
## Minify
``` sh
npm install
npm install grunt-cli -g
grunt uglify
```
## License
MIT
## How to contribute
pull requests welcome.
please use the following style guidelines
(http://nodeguide.com/style.html)
## Contributors
* ADEBISI Foluso A. (https://github.com/adebisi-fa)