title: Using Angular 1.x with TypeScript 1.5 and SystemJS
body: <p>I'm trying to use Angular 1.x with TypeScript 1.5.3 and SystemJS. The <code>index.html</code> page is set up to <code>System.import('bootstrapper')</code> which should start things up. </p>
  
  <p><code>bootstrapper.ts</code> gets compiled to <code>bootstrapper.js</code> and works fine as long as it doesn't use angular (i.e. doing just a <code>console.log()</code> works ok)</p>
  
  <p>Now, I'd like to import and use angular to bootstrap it. I've already done <code>jspm install angular</code> and I also installed some typings for angular using <code>tsd</code>. The typings are referenced at the top of the <code>bootstrap.ts</code> file.</p>
  
  <p>Unfortunately doing <code>import angular from 'angular'</code> doesn't compile, I get <code>Module "angular" has no default export</code>. My questions are:</p>
  
  <ol>
  <li>Why doesn't <code>import angular from 'angular'</code> compile? Looking in the <code>angular.d.ts</code> file I see <code>declare module 'angular'{ export = angular; }</code> which, if I understand correctly, is a default export from the module angular of a variable (defined above in the typings file) <code>declare var angular: angular.IAngularStatic</code></li>
  <li>I noticed that doing <code>import 'angular'</code> compiles and then I can actually reference <code>angular</code> and do e.g. <code>angular.module(...)</code>, but I don't think I understand correctly how this works. Shouldn't <code>import 'angular'</code> do a "bare import", i.e. running a module only for its side effects? If that's the case, does that mean that this import actually registers <code>angular</code> in the global scope?</li>
  </ol>
  
  <p>I'm pretty sure I don't understand correctly how modules/type definition files work in Typescript, thanks in advance for an explanation.</p>