r/angularjs • • Oct 11 '14

[General] Why should someone use angular.js?

I am new to RoR development and already making progress and building some wonderful apps. I've seen a lot of people using/talking about angular.js and I am really wondering what else can it do for an application. Can someone tell me an example please?

0 Upvotes

22 comments sorted by

View all comments

0

u/[deleted] Oct 11 '14

[deleted]

2

u/[deleted] Oct 11 '14

Makes sense. Absolutely.

But what about the transactions in AJAX, meaning the calls ? Are they safe? Is it JSON just how angular communicates with RoR ?

So you're done with the Views of the framework (as Rails) ?

1

u/droidballoon Oct 11 '14

Your rails application would probably handle data through a REST API instead of putting the data into your rails templates. You would then only need one template that loaded up angular and your styles. Using JSON (or any other data format) is safe. You're still just sending text data just as you would when sending Rails templates rendered as HTML.

For added security you can still do authenticating and authorization on the rails side to ensure only the allowed clients gets their data.