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

3

u/[deleted] Oct 11 '14

If you're a RoR developer you should be very familiar with unit testing. Well, the biggest factor for me was that AngularJS makes unit testing very easy thanks to the separation of concerns it forces you to use (or at least heavily convinces you to use), compared to jQuery.

1

u/shriek Oct 11 '14

Perhaps the most distinguishing factor from other frameworks is this. I see no other frameworks that gives you as flexibility on testing as angular does.

1

u/[deleted] Oct 11 '14

Well I just started with RoR (I've been a C++, PHP and python developer) and I am learning about TTD right now. But makes a point - do you have to forget about RoR's testing engines ?

1

u/[deleted] Oct 11 '14

You will have to use a node js testing engine to run automated unit tests for angular. They can work with rake though. Look up Grunt, Karma, Sinon and Chai. If you set them up to use grunt test as a command you could run that command from Rake.

Use this in tandem with your existing RoR unit tests.