title: Why am i getting "Unexpected token <" errors in angular 2?
body: <p>So I'm building an angular 2 app, it's simple. contains 1 page and a login screen. here is my file structure:</p>
  
  <pre><code>├── node_modules
  ├── app
  |    ├── app.component.ts
  |    ├── boot.ts  
  |    ├── pages
  |        |── dashboard
  |            |── dashboard.components.ts
  |            |── dashboard.html
  |        |── login
  |            |── login.components.ts
  |            |── login.html
  |            |── auth.ts
  </code></pre>
  
  <p>and my files:
  app.component.ts:</p>
  
  <pre class="lang-js prettyprint-override"><code>import {Component OnInit} from 'angular2/core';
  import { RouteConfig, ROUTER_DIRECTIVES ,Router} from 'angular2/router';
  import {LoginComponent} from './pages/login/login.component';
  import {DashboardComponent} from './pages/dashboard/dashboard.component'
  @Component({
      selector: 'app',
      directives:[ROUTER_DIRECTIVES],
      template:`
          &lt;div class="wrapper"&gt;
              &lt;router-outlet&gt;&lt;/router-outlet&gt;
          &lt;/div&gt;`
  })
  @RouteConfig([
      { path: '/',name: 'Home',redirectTo: ['Dashboard'] },
      { path: '/login',name:'Login',component: LoginComponent },
      { path: '/dashboard',name:'Dashboard',component: DashboardComponent,}
  ])
  export class AppComponent implements OnInit{
      private userAuthenticated = false;
      constructor(
          private _router: Router
      ){}
      ngOnInit(){
          if(!this.userAuthenticated){
              this._router.navigate(['Login']);
          }
      }
  }
  </code></pre>
  
  <p>dashboard.component.ts:</p>
  
  <pre class="lang-js prettyprint-override"><code>import {Component} from 'angular2/core';
  
  @Component({
      templateUrl:'app/pages/dashboard/dashboard.html'
  })
  export class DashboardComponent{
      public message = "Hello";
  }
  </code></pre>
  
  <p>login.components.ts:</p>
  
  <pre class="lang-js prettyprint-override"><code>import {Component} from 'angular2/core';
  import {NgForm}    from 'angular2/common';
  @Component({
      selector:"login",
      templateUrl:'app/pages/login/login.html',
  })
  export class LoginComponent{
  }
  </code></pre>
  
  <p>EVERYTHING at this point works great. Until I import auth.ts login.components.ts. Once I do this I get these errors:</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt;U @ system.src.js:4597o.execute @ system.src.js:4597i @ system.src.js:4597n @ system.src.js:4597execute @ system.src.js:4597y @ system.src.js:4597w @ system.src.js:4597p @ system.src.js:4597h @ system.src.js:4597(anonymous function) @ system.src.js:4597run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$$internal$$tryCatch @ angular2-polyfills.js:1511lib$es6$promise$$internal$$invokeCallback @ angular2-polyfills.js:1523lib$es6$promise$$internal$$publish @ angular2-polyfills.js:1494(anonymous function) @ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib$es6$promise$asap$$flush @ angular2-polyfills.js:1305
      angular2-polyfills.js:138 Uncaught SyntaxError: Unexpected token &lt;
          Evaluating http://local.intranet/auth
          Error loading http://local.intranet/app/boot.js
  </code></pre>
  
  <p>Here is what login.components.ts looks like now:</p>
  
  <pre class="lang-js prettyprint-override"><code>import {Component} from 'angular2/core';
  import {NgForm}    from 'angular2/common';
  import {Auth} from 'auth';
  @Component({
      selector:"login",
      templateUrl:'app/pages/login/login.html',
  })
  export class LoginComponent{
      login = new Auth("","");
      onSubmit(){console.log(this.login)};
  }
  </code></pre>
  
  <p>and auth.ts looks like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>export class Auth {
      constructor(
          public userName: string,
          public password: string
      ) {  }
  }
  </code></pre>