title: Refresh page without hashtag in Angular not working
body: <p>I have Spring+Angular+Rest webapp . I remove hashtage from url on this way ..</p>
  
  <pre><code>if(window.history &amp;&amp; window.history.pushState) {
      $locationProvider.html5Mode(true);
  }
  </code></pre>
  
  <p>in index.html</p>
  
  <pre><code> &lt;base href="/webapptest/"&gt;
  </code></pre>
  
  <p>Now, home page look OK, and everything work great .
   Looks like  : <code>http://localhost:8080/webapptest/</code></p>
  
  <p>Problem is when , after i remove hashtag, when I go to second page ... <code>http://localhost:8080/webapptest/page2</code></p>
  
  <p>First time page is show , but after reload  ... error 404 . I read that is problem on server side, becose i chabge url... but I don't know what to change ... 
  This is Spring Controller:</p>
  
  <pre><code>@RestController
  @RequestMapping(value="api/files")
  public class FileController {
  
  @RequestMapping( method = RequestMethod.GET)
  public @ResponseBody() String getFile(HttpServletRequest request) throws      IOException  {
      String htmlString = "";
      try {....
   ...
  return htmlString;
  }
  </code></pre>
  
  <p>This is controller and method which use page2 , the same controller use also home page but another method . Have someone idea what is problem and how to solve reload page without hashtag ?</p>
  
  <p>app.js :</p>
  
  <pre><code>uploadFile.config(['$routeProvider','$locationProvider', function($routeProvider,$locationProvider) {
  $routeProvider
      .when('/', {
          templateUrl : 'resources/html/home.html',
          controller : 'uploadFileController'
      })
      .when('/page2', {
          templateUrl : 'resources/html/page2.html',
          controller : 'uploadFileControllerAdmin'
      })
      .otherwise({
          redirectTo: '/'
      });
  if(window.history &amp;&amp; window.history.pushState) {
      $locationProvider.html5Mode(true);
  }
  }])
  </code></pre>