Using Angular with Rails

51 views
Skip to first unread message

Jedrin

unread,
Oct 22, 2015, 10:44:36 AM10/22/15
to Ruby on Rails: Talk

 Does using Angular with rails imply that I have to only send json data to the client, all my links have to be handled by angular and I would not use rails partial rendering ?

 That is kind of the impression I get.

Currently I have stuff like this which is not really best practices:
<div class="myeml" ng-click="pdfClicked($event)">

 The thing is, the client is not really concerned about whether angular is used or not. Also, I think they do not want the browser back button to become non functional between pages which seems like that can be tricky in some cases with angular, though I am not sure.

 I hesitated to consider ember because it seems like ember want to drive everything whereas I can work aspects of angular into my current code in some limited ways.

 I would have considered React, but I have less experience using that ..




James Davis, PhD

unread,
Oct 23, 2015, 8:14:31 AM10/23/15
to Ruby on Rails: Talk
No you do not have to immediately embrace all aspects of angular. My first app with angular only used it for displaying tables. Each subsequent app, I make it more angular and less rails.

Josh Jordan

unread,
Oct 24, 2015, 8:55:57 AM10/24/15
to Ruby on Rails: Talk
Absolutely not. You can adopt the pieces you like and use Angular patterns within isolated parts of your application. Here's a blog post I wrote on iterative adoption of AngularJS: http://tech.novus.com/multiple-single-page-apps-adopting-angularjs-in-an-existing-application/
Reply all
Reply to author
Forward
0 new messages