This post is now somewhat outdated. If you’re interested in Angular/Rails/Grunt/JavaScript/HTML, read on. If you’d prefer Angular/Rails/Gulp/CoffeeScript/Jade, check out this newer post. Why this tutorial exists I wrote this tutorial because I had a pretty tough time getting Rails and Angular to talk to each other as an SPA. The best resource I could find out [ ]
Getting Grunt to start your Rails server is extremely simple and quick if you just know how. By the way, you might want to check out my How to Wire Up Ruby on Rails and AngularJS as a Single-Page Application tutorial before you proceed. I realize your existing Gruntfile.js setup might be different from mine, and I frankly have no [ ]
Why deploying a single-page application is different Before I explain how to deploy an Angular/Rails application to Heroku, it might make sense to explain why deploying a single-page application (SPA) is different from deploying a “traditional” web application. The way I chose to structure the SPA in this example is to have all the client-side code like on this [ ]
There are three steps to getting HTML5 pushState working in an Angular/Rails SPA. The first step is to enable pushState within Angular. This is super simple. If you just do the first step it will appear to work, but you’ll have a subtle issue I call “the reload problem” that will need to be addressed for both [ ]
I struggled for some time deciding how to “properly” put together an integration test for an Angular/Rails single-page application. First I tried to drive Rails with Protractor but that felt weird. Then it dawned on me that the fact that the SPA-ness of my Rails app is just a detail. This is a Rails app [ ]
I’ve seen some examples of using AngularJS services online that follow the convention of FooService.someMethod() or BarService.whateverElse(). I was confused about how to use AngularJS without throwing all my useful object-oriented programming experience out the window. I’ve come up with a solution that I think I like. Here’s the CoffeeScript class. It’s simple enough that I think it [ ]
Why this tutorial exists I wrote this tutorial because I had a pretty tough time getting Rails and Angular to talk to each other as an SPA. The best resource I could find out there was Ari Lerner’s Riding Rails with AngularJS. I did find that book very helpful and I thought it was really well-done, [ ]
I talked with my friend Tero Parviainen about his outstanding Angular book, Build Your Own AngularJS, as well as what it was like to transition from Java to Rails to front-end, as well as CoffeeScript vs. ES6, Angular 2, and a few other topics. Enjoy. Jason Swett: Hello everyone, I’m Jason Swett, author of angularonrails.com. I’m here [ ]
Here I talk with my friend Charles Max Wood about, among other things, his new project, RailsClips, a series of screencasts which kind of picks up where RailsCasts left off. Enjoy. Jason Swett: Hello everyone. I’m Jason Swett, author of angularonrails.com. I’m here with Charles Max Wood of Devchat.tv, among a number of other things and we’re here [ ]