title: Javascript - Angular 2 and nw.js WebSocket context
body: <p>I'm having what I think might be the exact same problem as this question: <a href="https://stackoverflow.com/questions/34833992/how-to-get-started-with-angular2-in-nw-js/34855997#34855997">How to get started with angular2 in nw.js</a></p>
  
  <p>I posted some additional details there to try and help figure out what's going on, but everything I contributed was deleted and I was told to ask a new question.</p>
  
  <hr>
  
  <p>I followed the Angular 2 'quickstart' javascript tutorial found on the angular website.</p>
  
  <p>Then I tried running my app with nw.js, and it fails to load. I am running on Windows 10, and I used the same angular2 app, with a slightly different package.json:</p>
  
  <pre><code>{
    "name": "test",
    "version": "0.0.1",
    "description": "",
    "main": "index.html",
    "scripts": {
      "start": "npm run lite",
      "lite": "lite-server"
    },
    "dependencies": {
      "angular2": "2.0.0-beta.0",
      "systemjs": "0.19.6",
      "es6-promise": "^3.0.2",
      "es6-shim": "^0.33.3",
      "reflect-metadata": "0.1.2",
      "rxjs": "5.0.0-beta.0",
      "zone.js": "0.5.10"
    },
    "devDependencies": {
      "lite-server": "^1.3.1"
    },
    "window": {
      "title": "TEST",
      "frame": true,
      "toolbar": true,
      "width": 1200,
      "height": 675,
      "icon": "icon.png"
    }
  }
  </code></pre>
  
  <p>My app does load correctly when I run it from the command line with </p>
  
  <pre><code>npm start
  </code></pre>
  
  <p>But when I run my app with</p>
  
  <pre><code>nw .
  </code></pre>
  
  <p>I get this error in my console: <a href="https://i.imgur.com/zrO2YG8.png" rel="nofollow noreferrer">http://i.imgur.com/zrO2YG8.png</a></p>
  
  <p>And here's the line in code: <a href="https://i.imgur.com/uQWz4TT.png" rel="nofollow noreferrer">http://i.imgur.com/uQWz4TT.png</a></p>
  
  <p>EDIT: The below section is probably not relevant, as it's referencing the Node context of nwjs, not the window context.</p>
  
  <p><strike>Also, I just found this link with the following information: Some other browser features (such as Worker and WebSocket interfaces) are also unavailable in the Node's context. github.com/nwjs/nw.js/wiki/Differences-of-JavaScript-contexts ... anyone know what this means or if it's impacting angular2-polyfills.js compatibility with nw.js?</strike></p>