angular-add-csrf-token
If you use angular and templates with forms that need csrf tokens, this directive makes it easy to use them without polluting your code.
Install with bower:
bower install angular-add-csrf-token --saveAdd to your app.coffee:
#= require angular-add-csrf-tokenand to your module's dependencies:
angular.module('your-app', [
'stefansundin.add-csrf-token'
])Then add the directive to your form:
<form ... add-csrf-token>And you're done!