title: How do I run an Angular 2 Page in a Spring MVC Application?
body: <p>I want to have index.html from an angular 2 project to run as a welcome page of a Spring MVC application. <br>The way I run the angular 2 is via <code>npm start</code>. If I load the index.html without doing <code>npm start</code>, components do not load properly.<br> How will I be able to make index.html as the welcome page for my Spring MVC Project?</p>
  
  <p>Edit: Added some more details.</p>
  
  <p>The angular-seed project is loaded as is. I'm just trying to load the index.html from the angular-seed project. node modules have already been added and it runs perfectly with <code>npm start</code>.</p>
  
  <p>As for my web.xml, I have the welcome file this way:</p>
  
  <pre><code>  &lt;welcome-file-list&gt;
        &lt;welcome-file&gt;AngularContent/src/index.html&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  </code></pre>
  
  <p>And index.html has the following:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Angular QuickStart&lt;/title&gt;
      &lt;base href="/"&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;base href="/"&gt;
      &lt;link rel="stylesheet" href="styles.css"&gt;
  
      &lt;!-- Polyfill(s) for older browsers --&gt;
      &lt;script src="AngularContent/node_modules/core-js/client/shim.min.js"&gt;&lt;/script&gt;
  
      &lt;script src="AngularContent/node_modules/zone.js/dist/zone.js"&gt;&lt;/script&gt;
      &lt;script src="AngularContent/node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
  
      &lt;script src="AngularContent/src/systemjs.config.js"&gt;&lt;/script&gt;
      &lt;script&gt;
        System.import('AngularContent/src/main.js').catch(function(err){ console.error(err); });
      &lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;my-app&gt;Loading AppComponent content here ...&lt;/my-app&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>