Use https://github.com/olov/ng-annotate in the Rails asset pipeline.
Add this line to your application's Gemfile:
And then execute:
The ngannotate-rails version number mirrors the version number for the version of ngannotate that is bundled with it.
Q: I installed ngannotate-rails, but my assets aren't getting processed with ngannotate.
A: Remember to delete
touchall the related asset files so that the cached versions get regenerated. If you've precompiled your assets into
public/assets, you'll need to re-precompile them.
The actual ngannotate project is bundled into this gem via Browserify. You can update to the latest version of ngannotate via Rake:
There is a Rails 3 application bundled in
example/ that you can use to test the asset pipeline integration. Don't forget to remove
tmp/cache/assets after upgrading to the latest version of ngannotate.
This gem is based into https://github.com/btford/ngmin