14 comments

[ 3.8 ms ] story [ 48.5 ms ] thread
This isn't a full-blown example, but AngularJS works phenomenally as an interaction layer on top of a REST API. Creating such an API with Rails is almost trivial. Postgres + Rails + AngularJS (via Bower) has become my go-to stack and is an absolute blast to develop with.
This is the approach I'm taking for the Admin, actually. Haven't started yet, but really looking forward to it.
Nice. If you're not already familiar with Restangular, be sure to check it out: https://github.com/mgonto/restangular

I tried rolling my own Angular API service, and it was a great learning experience, but Restangular trumps any vanilla service I could roll.

I'm pretty much doing the exact same thing, but with django instead of rails. That gives a very nice Postgres + Django + AngularJS. When I need to add realtime feeds I throw RabbitMQ with the Web-Stomp Plugin into the mix: it works amazingly well!
Do you have a link for a guide or tutorial to doing this?
Congrats on relaunch! You mentioned, you had no real experience with Rails outside of tutorials. What kind of problems did you run into while creating your first production quality app? I'd love a post about how it was working with Rails.
The biggest hurdle was using Rails 4 and Bootstrap 3 because the gems I was trying to use weren't quite there yet.

I'd argue that it is production quality ;)

There are no tests, which makes me feel bad about myself, and in the future I'd prefer to TDD the whole thing, but in terms of cognitive load up front it was too much to take in.

I browsed egghead.io (it looks great, btw!) and I'm trying to figure out what parts are Angular and what are simply Rails server-generated views.

The signin/signup look to be using standard Rails, but what parts are using Angular?

There are no AngularJS pieces to the site (outside of the videos themselves, which are almost strictly geared towards Angular)
heh. I get the title now, and explains my confusion with the article content. It led me to believe that you build an AngularJS-and-Rails-powered website.

Thanks for the clarification.

Has anybody figured out how to add headless tests to this stack (Rails 4, AngularJS)? I've tried using Karma and Teaspoon and they both ran into problems. Karma would cause PhantomJS to crash on launch and Teaspoon could never load the asset pipeline properly, so Angular was never being included. Example links would be greatly appreciated.
The first few videos wouldn't load for me on the website itself thoug [latter ones do] - on Macbook Pro/Chrome

Watching them on Youtube - very useful!