title: Angular static Base URl and routing with useHash=True
body: <p>I am using Angular 6, I want my app to have a static base URL for the purpose of reverse proxy configuration.</p>
  
  <p>In my <code>index.html</code> I set base Url</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;APM&lt;/title&gt;
    &lt;base href="/my-base"&gt;
  
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="icon" type="image/x-icon" href="favicon.ico"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;pm-root&gt;&lt;/pm-root&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In my <code>app.module.ts</code> I have the routing table configured</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { FormsModule } from '@angular/forms';
  import { HttpClientModule } from '@angular/common/http';
  import { NgModule } from '@angular/core';
  import { RouterModule } from '@angular/router';
  
  import { AppComponent } from './app.component';
  import { WelcomeComponent } from './home/welcome.component';
  
  @NgModule({
    declarations: [
      AppComponent,
      WelcomeComponent
    ],
    imports: [
      BrowserModule,
      FormsModule,
      HttpClientModule,
      RouterModule.forRoot([
        { path: "welcome", component: WelcomeComponent },
        { path: "", redirectTo: "welcome", pathMatch: "full" },
        { path: "**", redirectTo: "welcome", pathMatch: "full" }
      ], { useHash: true })
    ],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p>After I launch the application I noticed the URL is <code>http://localhost:4200/my-base#/welcome</code>, there is a # after <code>my-base</code>.</p>
  
  <p>If I change the code in routing to have <code>useHash: false</code> then the # is after my base URL and becomes <code>http://localhost:4200/my-base/welcome#/welcome</code></p>
  
  <p>I could not find lots of information what exact the meaning of <code>useHash: false</code>, what is the consequence?</p>