I am developing a Ruby on Rails application while using AngularJS for the front end. I am using AngularJS resource to query data out of my MySql database and storing them within the 'entries' variable. Ruby on Rails already has controllers setup for 'Showing','Editing', and 'Destroying' rows from the database so I'm not sure if I want to reinvent the wheel by ignoring these said controllers and using the AngularJS Resource instead. While using ng-repeat to filter my data I would also like to add the RoR 'Showing','Editing', and 'Destroying' links within each respected row. I am unable to use RoRs <% @songs.each do |song| %> statement because that would add a loop inside of my ng-repeat loop. Instead I simply want to use the AngularJS {{e.id}} variable and pass it into the <%= link_to 'Edit', edit_song_path(ID_VARIABLE) %> function, but RoR and AngularJS variables don't seem to play well together. Is there any "easy" way to do this?
<div class="container">
<ul class="list-group">
<table class="table">
<thead>
<tr>
<th>Band</th>
<th>Title</th>
</tr>
</thead>
<tbody ng-repeat="e in entries | filter:searchFilter">
<tr>
<td>{{e.band}}</td>
<td>{{e.title}}</td>
<td>{{e.id}}</td>
<td>
<!-- Pass 'e.id' to the 'link_to' function -->
<%= link_to 'Edit', edit_song_path(**{{e.id}}**) %>
</td>
</tr>
</tbody>
</table>
</ul>
</div>
</div>