ng-attributes

This gem provides Angular.js ng attributes for rails view helpers.

Installing

For installing gem write in gemfile

gem 'ng-attributes'

Usage

Usage is the same as usage of data attribute.

  link_to 'hello world', hello_world_path, ng: { click: 'doSomething()' }

will generate

  <a href="/hello_world" ng-click="doSomething()">hello world</a>