title: Angular 2 Deployment to IIS with Visual Studio 2015 gives "route is undefined" error
body: <p>I have a .Net core project in VS 2015 (update 3), using Angular 2, which is running perfectly in Visual Studio, using IIS Express, on a Windows 10 professional PC. 
  But when I deploy the application to my local IIS instance (using file system publish method), I get an error saying:</p>
  
  <p>In Firefox: Uncaught (in promise): TypeError: route is undefined</p>
  
  <p>In Chrome: Uncaught (in promise): TypeError: Cannot read property 'outlet' of undefined</p>
  
  <p>I can't understand what would cause this, since it is working fine locally. I am not getting any 404 errors, and I can see on the Chrome network tab that tons of files are loading successfully.</p>
  
  <p>I have not been able to find many deployment configuration parameters to tinker with. The stacktrace information is not at all helpful (to me), but may reveal something to someone, so here it is (from Firefox):</p>
  
  <pre><code>Unhandled Promise rejection: route is undefined ; Zone: angular ; Task: Promise.then ; Value: TypeError: route is undefined
  Stack trace:
  getOutlet$1@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:734:9
  expandPathsWithParamsAgainstRoute@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:550:13
  expandPathsWithParams@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:540:24
  expandSegment@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:530:20
  expandSegmentChildren/&lt;@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:534:76
  mapChildren/&lt;@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:210:44
  forEach@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:82:17
  mapChildren@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:208:9
  expandSegmentChildren@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:534:16
  expandSegment@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:527:39
  applyRedirects@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:503:43
  Router&lt;/Router.prototype.runNavigate/&lt;@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:1871:17
  ZoneAwarePromise@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:584:30
  Router&lt;/Router.prototype.runNavigate@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:1866:20
  Router&lt;/Router.prototype.scheduleNavigation/&lt;@http://localhost/CrsInstrNetCore/node_modules/@angular/router//bundles/router.umd.js:1851:65
  Zone&lt;/ZoneDelegate&lt;/ZoneDelegate.prototype.invoke@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:323:20
  NgZoneImpl/this.inner&lt;.onInvoke@http://localhost/CrsInstrNetCore/node_modules/@angular/core//bundles/core.umd.js:9100:36
  Zone&lt;/ZoneDelegate&lt;/ZoneDelegate.prototype.invoke@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:322:20
  Zone&lt;/Zone&lt;/Zone.prototype.run@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:216:25
  scheduleResolveOrReject/&lt;@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:571:53
  Zone&lt;/ZoneDelegate&lt;/ZoneDelegate.prototype.invokeTask@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:356:24
  NgZoneImpl/this.inner&lt;.onInvokeTask@http://localhost/CrsInstrNetCore/node_modules/@angular/core//bundles/core.umd.js:9091:36
  Zone&lt;/ZoneDelegate&lt;/ZoneDelegate.prototype.invokeTask@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:355:24
  Zone&lt;/Zone&lt;/Zone.prototype.runTask@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:256:29
  drainMicroTaskQueue@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:474:26
  ZoneTask/this.invoke@http://localhost/CrsInstrNetCore/node_modules/zone.js/dist/zone.js:426:22
  </code></pre>
  
  <p>I'm not at all sure what files would be helpful to show, since it's all working fine in the development environment. If useful, here is my tsconfig.json file:</p>
  
  <pre><code>{
    "compilerOptions": {
      "noImplicitAny": true,
      "noEmitOnError": true,
      "removeComments": false,
      "sourceMap": true,
      "target": "es5",
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "module": "system",
      "moduleResolution": "node"
    },
    "exclude": [
      "node_modules",
      "wwwroot"
    ]
  }
  </code></pre>
  
  <p>Can anyone suggest how to explore/resolve the problem?</p>