title: AngularJS Multi-Page App Site Boilerplate Site Structure Advice
body: <p>I am looking for some guidance with creating an AngularJs multi-page app served by a Laravel Backend. All web app tutorials on the net point to creating SPAs and I am just getting started with Angular - so please go easy on me.</p>
  
  <p>ProductPage example - <a href="http://example.com/products/widget">http://example.com/products/widget</a></p>
  
  <pre><code>&lt;html data-ng-app='ExampleApp'&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body data-ng-controller='ProductController'&gt;
          // ProductPage Content Served by laravel with angular tags
  
          &lt;script type="text/javascript" src="/js/lib/angular.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="/js/app.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="/js/controllers/ProductController.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>CartPage Example - <a href="http://example.com/cart">http://example.com/cart</a></p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body data-ng-controller='CartController'&gt;
          // CartPage Content Served by web-server with angular tags
  
          &lt;script type="text/javascript" src="/js/lib/angular.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="/js/app.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="/js/controllers/CartController.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So in the above examples, I have created two pages, which are served by the web server with pretty much all static content. But the pages have been marked up with angular tags. On each static page, I have referenced a different AngularJS controller.</p>
  
  <p>Is this the right way of tackling the problem or should I be allowing app.js to load up the controllers / inject the dependencies?</p>
  
  <p>Also, any guidance on sharing data between controllers in this multi-page app and links to decent resources / examples would be really helpful. e.g Would I need to pass e.g. Items added to shopping cart to an api from the product page, then query this api again to retrieve the cart contents?</p>