title: What is the cleanest way to integrate Ruby on Rails with AngularJS?
body: <p>I am creating a Ruby on Rails application and I would like to use AngularJS in front-end. 
  I am planning to use the following file structure (from <a href="https://scotch.io/tutorials/angularjs-best-practices-directory-structure" rel="noreferrer">here</a>) for the front-end:</p>
  
  <pre><code>angularapp/
  ----- shared/       // acts as reusable components or partials of our site
  ---------- sidebar/
  --------------- sidebarDirective.js
  --------------- sidebarView.html
  ---------- article/
  --------------- articleDirective.js
  --------------- articleView.html
  ----- components/   // each component is treated as a mini Angular app
  ---------- home/
  --------------- homeController.js
  --------------- homeService.js
  --------------- homeView.html
  ---------- blog/
  --------------- blogController.js
  --------------- blogService.js
  --------------- blogView.html
  ----- app.module.js
  ----- app.routes.js
  </code></pre>
  
  <p>I have three main concerns:</p>
  
  <p>1 - I would like my whole angular app to go through asset pipelining feature of Ruby on Rails</p>
  
  <p>2 - I do not want to break the structure of my angular app and move it's files to the corresponding Rails asset folder.</p>
  
  <p>3 - I do not want to put my angular application under assets/javascripts folder since it does not consist of only javascript files.</p>
  
  <p>What is the cleanest way to integrate this structure with my Ruby on Rails application?</p>