title: Angularjs, Typescript, Uglify Failed to instantiate module myApp .... unknown provider: a
body: <p>I am receiving this error whilst using typescript with angularjs to inject a custom service.  The resulting typescript transpiled JavaScript has been ran through uglify.  The app works when not deployed using uglify.</p>
  
  <pre><code>Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
  Error: [$injector:modulerr] Failed to instantiate module MyModule due to:
  Error: [$injector:unpr] Unknown provider: a
  http://errors.angularjs.org/1.2.21/$injector/unpr?...&lt;omitted&gt;...2) 
  </code></pre>
  
  <p>See plunker: <a href="http://plnkr.co/edit/mX7TCPAO3VycUp4Nw2Oy?p=preview" rel="nofollow">http://plnkr.co/edit/mX7TCPAO3VycUp4Nw2Oy?p=preview</a></p>
  
  <p>I am aware that it works by altering the uglify options to remove mangle, but I would like to keep mangle.</p>
  
  <p>Any help would be much appreciated :-)</p>