title: Custom renderer for Angular2
body: <p>I'm experimenting with a custom renderer for Angular2. </p>
  
  <p>I've set up an simple <a href="https://github.com/ralfstx/angular2-renderer-example" rel="noreferrer">example project</a> with a minimal Angular2 application (<code>AppComponent</code>) that I'd like to run on Node.js. I've implemented a custom <a href="https://github.com/ralfstx/angular2-renderer-example/blob/master/src/custom-dom-adapter.ts" rel="noreferrer">DomAdapter</a> and a custom <a href="https://github.com/ralfstx/angular2-renderer-example/blob/master/src/custom-renderer.ts" rel="noreferrer">Renderer</a> (just a dummy that should log to the console), then I try to wire everything together in some <a href="https://github.com/ralfstx/angular2-renderer-example/blob/master/src/custom-bootstrap.ts" rel="noreferrer">custom bootstrap code</a>.</p>
  
  <p>Currently, I'm stuck with the following error message:</p>
  
  <pre><code>Error: No precompiled component AppComponent found
  at new BaseException (/home/ralf/git/node-angular-example/node_modules/angular2/src/facade/exceptions.js:15:23)
  at Compiler_.compileInHost (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/linker/compiler.js:47:19)
  at DynamicComponentLoader_.loadAsRoot (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/linker/dynamic_component_loader.js:101:31)
  at di_1.provide.useFactory (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/application_ref.js:29:47)
  at Injector._instantiate (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:763:27)
  at Injector._instantiateProvider (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:714:25)
  at Injector._new (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:703:21)
  at InjectorInlineStrategy.getObjByKeyId (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:216:33)
  at Injector._getByKeyDefault (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:899:37)
  at Injector._getByKey (/home/ralf/git/node-angular-example/node_modules/angular2/src/core/di/injector.js:845:25)
  </code></pre>
  
  <p>Can somebody explain what this means and what's missing?</p>
  
  <p><strong>Update:</strong>
  As Tobias Bosch pointed out, the <code>COMPILER_PROVIDERS</code> were missing. However, after adding them I get another error:</p>
  
  <pre><code>Error: DI Exception
  at NoProviderError.BaseException [as constructor] (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/facade/exceptions.js:15:23)
  at NoProviderError.AbstractProviderError [as constructor] (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/exceptions.js:38:16)
  at new NoProviderError (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/exceptions.js:74:16)
  at Injector._throwOrNull (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:854:19)
  at Injector._getByKeyDefault (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:905:21)
  at Injector._getByKey (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:845:25)
  at Injector._getByDependency (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:831:25)
  at Injector._instantiate (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:723:36)
  at Injector._instantiateProvider (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:714:25)
  at Injector._new (/home/ralf/git/angular2-renderer-example/node_modules/angular2/src/core/di/injector.js:703:21)
  </code></pre>
  
  <p>Could you help me understanding this one? How can I tell which provider is missing?</p>
  
  <p><strong>Update 2:</strong>
  Turned out that an implementation of XHR was missing. <a href="https://github.com/ralfstx/angular2-renderer-example/commit/bad8a03b46e38575e4bc0f9c5c5741cc4426af1c" rel="noreferrer">Adding a shim</a> fixed the issue. Now it's working.</p>