Angular 2 and Phaser
<p>I'm trying to create a component which includes Phaser.</p>

<p>Comp.ts (extract):</p>

<pre><code>/// &lt;reference path=“../phaser/phaser.d.ts” /&gt;

import { Component, OnInit } from '@angular/core';
import * as Phaser from 'phaser';

export class Comp implements OnInit {
   constructor() {
       console.log(Phaser);
   }

   ngOnInit() {
       console.log(Phaser);
   }
}
</code></pre>

<p>in system-config.ts:</p>

<pre><code>System.config({
//…
paths: {
  'phaser': 'app/phaser/phaser.min.js'
});
</code></pre>

<p>I've copied all the Phaser code into app/phaser/. WebStorm finds the declarations for Phaser inside my component and the build with "ng build/ng serve" works fine.</p>

<p>But, the console.log(Phaser) in both constructor and ngOnInit returns "Object {}". But if I do a console.log(Phaser) in the browser, it returns the correct Phaser object.</p>

<p>How do I find the Phaser object inside my component?</p>