Last Updated: February 25, 2016
·
798
· jordanyaker

Working With Angular, Yeoman, and Rails

Development with Angular can be done as a part of the Rails asset pipeline or independently using Yeoman, Grunt, and Bower. For smaller projects, using the Rails asset pipeline is supposed to be more convenient. For medium and larger projects, independent development is supposed to be easier.

To get started with Yeoman on an existing Rails project, do the following:

  1. Install Node and NPM as part of your development environment.
  2. Install Yeoman, Grunt, and Bower globally using sudo npm install -g yo grunt-cli bower.
  3. Globally install the generators needed for development with sudo npm install -g generator-angular generator-karma.
  4. In order to connect to the Rails API server, you will want to globally install the Client-Connect-Proxy with sudo npm install -g grunt-connect-proxy --save-dev.
  5. Update the dist configuration variable in Gruntfile.js to be ../public.
  6. Start development with grunt serve.