title: angular2 routing not working when you deployed dist folder onto tomcat server
body: <p>I generated <strong>dist</strong> folder in my project <strong>prj-routing-final</strong>  with <strong>angular-cli</strong> with command  <code>ng-build --prod --aot</code>  and deployed on to tomcat server. i was able to navigate to all routes <code>http://localhost:8081/dist/</code> and view them without reloading. Once if i navigate to <code>http://localhost:8081/dist/recipes/0</code>  and  reload the page this error coming up</p>
  
  <pre><code>HTTP Status 404 – Not Found  
  Type Status Report
  Message /dist/recipes/0
  Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
  Apache Tomcat/8.5.14
  </code></pre>
  
  <p>I am not getting any errors if i serve with <code>ng serve</code>. i was able navigate to all routes, reload the pages, move back and forth.</p>
  
  <p>I also tried serving <strong>dist</strong> with  <strong>Http-server</strong> available in <a href="https://www.npmjs.com/package/http-server" rel="nofollow noreferrer">https://www.npmjs.com/package/http-server</a>   getting same kind of error after reloading 
  <code>No webpage was found for the web address: http://localhost:8080/recipes/0</code> 
  <a href="https://github.com/venkatakrishna874/angular4" rel="nofollow noreferrer">GitHub repo of my project</a> </p>
  
  <p>Please kindly help me.</p>