title: PathLocationStrategy works only locally
body: <p>I have problem with hash, on my working project when I build it, on test project all work correctly. I already read this questions in google:
  <a href="https://stackoverflow.com/questions/41662326/angular2-without-hash-in-the-url">Angular2 without hash in the url</a>
  <a href="https://forum.ionicframework.com/t/url-routing-without-hash/81140" rel="noreferrer">https://forum.ionicframework.com/t/url-routing-without-hash/81140</a>
  but I didn't find answer.
  When I add</p>
  
  <pre><code>{provide: LocationStrategy, useClass: HashLocationStrategy}
  </code></pre>
  
  <p>All work correctly, but with hash. When I add</p>
  
  <pre><code>{provide: LocationStrategy, useClass: PathLocationStrategy}
  </code></pre>
  
  <p>It work only on local version. But working version don't work <a href="http://joxi.ru/n2YLOaMijK7Pam" rel="noreferrer">http://joxi.ru/n2YLOaMijK7Pam</a>
  How can I remove this hash <a href="http://joxi.ru/RmzBzxDTWbjeQm" rel="noreferrer">http://joxi.ru/RmzBzxDTWbjeQm</a> what would it work on my build project ?</p>
  
  <p>app.module.ts</p>
  
  <pre><code>import {BrowserModule} from '@angular/platform-browser';
  import {NgModule} from '@angular/core';
  
  import {AppComponent} from './app.component';
  import {MaterialModule} from '../shared/mat.module';
  import {UserModule} from './user/user.module';
  import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
  import {AppRoutingModule} from './app-routing.module';
  import {ToolbarComponent} from './toolbar/toolbar.component';
  import {HashLocationStrategy, LocationStrategy, PathLocationStrategy} from '@angular/common';
  import { TestingRComponent } from './testing-r/testing-r.component';
  
  @NgModule({
    declarations: [
      AppComponent,
      ToolbarComponent,
      TestingRComponent
    ],
    imports: [
      BrowserModule,
      MaterialModule,
      UserModule,
      BrowserAnimationsModule,
      AppRoutingModule
    ],
    providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}],
    bootstrap: [AppComponent]
  })
  export class AppModule {
  }
  </code></pre>
  
  <p>app-routing.module.ts</p>
  
  <pre><code>   import {NgModule} from '@angular/core';
  import {Route, RouterModule} from '@angular/router';
  import {UserComponent} from './user/user.component';
  import {TestingRComponent} from './testing-r/testing-r.component';
  
  const routes: Route[] = [
    {path: '', redirectTo: '', pathMatch: 'full'},
    {
      path: 'auth',
      component: UserComponent
    },
    {
      path: 'testing',
      component: TestingRComponent
    }
  ];
  
  @NgModule({
    imports: [
      RouterModule.forRoot(routes)
    ],
    exports: [
      RouterModule
    ]
  })
  export class AppRoutingModule {
  }
  </code></pre>
  
  <p>user-routing.module.ts</p>
  
  <pre><code>  import {NgModule} from '@angular/core';
  import {Route, RouterModule} from '@angular/router';
  import {RegistrationComponent} from './registration/registration.component';
  import {UserComponent} from './user.component';
  import {LoginComponent} from './login/login.component';
  import {TestingComponent} from './dynamic-fields/testing/testing.component';
  
  const routes: Route[] = [
    {
      path: 'auth', component: UserComponent,
      children: [
        {
          path: 'registration',
          component: RegistrationComponent
        },
        {
          path: 'login',
          component: LoginComponent
        },
        {
          path: 'testing',
          component: TestingComponent
        }
      ]
    }
  ];
  
  @NgModule({
    imports: [
      RouterModule.forRoot(routes)
    ],
    exports: [
      RouterModule
    ]
  })
  export class UserRoutingModule {
  }
  </code></pre>