title: "Error: No base href set." after upgrade to Angular 8
body: <p>After completing an update from Angular 5.x to 8.0.1, my application compiles but I get the following error at runtime (using <code>ng serve</code>):</p>
  
  <blockquote>
    <p>Error: No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.</p>
  </blockquote>
  
  <p>I've looked at other posts such as: <a href="https://stackoverflow.com/questions/34535163/angular-2-router-no-base-href-set">Angular 2 router no base href set</a>, however, my app already has the HTML base element in it.  My <code>index.html</code> is as follows:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;MyApp&lt;/title&gt;
    &lt;base href="/"&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;app-root&gt;&lt;/app-root&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I can solve the problem by adding:</p>
  
  <pre><code>{
    provide: APP_BASE_HREF,
    useValue: '/'
  }
  </code></pre>
  
  <p>to my <code>app.modules.ts</code>, but I'm more interested in understanding why this is now needed, when a bare bones app created with <code>ng new</code> works without this provider.</p>