title: Angular 4 Error: Unexpected token <
body: <p>I'm building a web app using visual studio 2015 and angular 4.x
  I have followed <a href="https://www.codeproject.com/Articles/1181888/Angular-in-ASP-NET-MVC-Web-API-Part" rel="nofollow noreferrer">this</a> tutorial</p>
  
  <p>But i keep getting the error
   Unexpected token &lt;</p>
  
  <p><a href="https://i.stack.imgur.com/62XcA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/62XcA.png" alt="enter image description here"></a></p>
  
  <p>my main .ts </p>
  
  <pre><code>import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
  
  import { AppModule } from './app.module';
  
  
  
  platformBrowserDynamic().bootstrapModule(AppModule);
  </code></pre>
  
  <p><strong>wwwroot structure</strong></p>
  
  <p><a href="https://i.stack.imgur.com/wsapb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wsapb.png" alt="wwwroot structure"></a></p>
  
  <p>_Layout.cshtml looks like this</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;title&gt;@ViewBag.Title - My ASP.NET Application&lt;/title&gt;
      @Styles.Render("~/Content/css")
      @Scripts.Render("~/bundles/modernizr")
  
      &lt;script src="/node_modules/core-js/client/shim.min.js"&gt;&lt;/script&gt;
      &lt;script src="/node_modules/zone.js/dist/zone.js"&gt;&lt;/script&gt;
      &lt;script src="/node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
      &lt;script src="/systemjs.config.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          System.import('wwwroot').catch(function(err){ console.error(err); });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;div class="container body-content"&gt;
          @RenderBody()
          &lt;hr /&gt;
          &lt;footer&gt;
              &lt;p&gt;&amp;copy; @DateTime.Now.Year - My ASP.NET Application&lt;/p&gt;
          &lt;/footer&gt;
      &lt;/div&gt;
  
      @Scripts.Render("~/bundles/jquery")
      @Scripts.Render("~/bundles/bootstrap")
      @RenderSection("scripts", required: false)
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>systemjs.config.js</p>
  
  <pre><code>(function (global) {
      System.config({
          map: {
              'rxjs': 'node_modules/rxjs',
              '@angular': 'node_modules/@angular',
              'app': './app',
              'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api'
          },
          packages: {
              'app': {
                  main: 'main.js',
                  defaultExtension: 'js'
              },
  
              '@angular/platform-browser': {
                  main: 'bundles/platform-browser.umd.js'
              },
  
              '@angular/core': {
                  main: 'bundles/core.umd.js'
              },
  
              '@angular/http': {
                  main: 'bundles/http.umd.js'
              },
  
              '@angular/compiler': {
                  main: 'bundles/compiler.umd.js'
              },
  
              '@angular/compiler-cli': {
                  main: 'index.js'
              },
  
              '@angular/router': {
                  main: 'bundles/router.umd.js'
              },
  
              '@angular/upgrade': {
                  main: 'bundles/upgrade.umd.js'
              },
  
              '@angular/forms': {
                  main: 'bundles/forms.umd.js'
              },
  
              '@angular/common': {
                  main: 'bundles/common.umd.js',
                  defaultExtension: 'js'
              },
  
              '@angular/platform-browser-dynamic': {
                  main: 'bundles/platform-browser-dynamic.umd.js'
              },
  
              '@angular/platform-server': {
                  main: 'bundles/platform-server.umd.js'
              },
  
              'rxjs': {
                  defaultExtension: 'js'
              },
  
              'angular2-in-memory-web-api': {
                  main: './index.js',
                  defaultExtension: 'js'
              }
          }
      });
  })(this);
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;app-root&gt;&lt;/app-root&gt;
  </code></pre>
  
  <p>I'm not able to go any further.
  Can anybody guide me?</p>
  
  <p>Thanks!</p>