Distributed via
Support input[type="file"] with ng-model and transparently submit with HTML5 FormData
LiveScript is a compile-to-js language, which provides us more robust way to write JavaScript.
It also has great readibility and lots of syntax sugar just like you're writting python/ruby.
- Download and include
ng-form-data.js
ORng-form-data.min.js
.
Then include them through script tag in your HTML.
Add this line to your application's Gemfile:
gem 'ng-form-data'
And then execute:
$ bundle
Then add these lines to the top of your app/assets/javascripts/application.js
file:
//= require angular
//= require ng-form-data
And include in your angular
module definition:
var module = angular.module('my-awesome-project', ['tomchentw.boilerplate']).
- Fork it ( https://github.com/tomchentw/ng-form-data/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request