title: Angular 2 RuntimeCompiler: No XHR implementation has been provided
body: <p>I'm trying to make Angular 2 dynamically compile a fragment of HTML using RuntimeCompiler. I have found the solution in this <a href="https://stackoverflow.com/questions/34784778/equivalent-of-compile-in-angular-2?newreg=e44b04de620a472eb92e76f48142f330">post </a> (see <strong>Angular 2.0 RC 5 related</strong> answer) and it works until I use templateUrl instead of in-line template in the decorator of component.</p>
  
  <pre><code>@Component({
    selector: 'dynamic-detail',
    providers: [DynamicTypeBuilder, DynamicTemplateBuilder],
    templateUrl: 'app/dynamic/detail.view.html',
  })
  </code></pre>
  
  <p>When I use templateUrl, I get the following error: </p>
  
  <pre><code>Unhandled Promise rejection: EXCEPTION: Error in ./AppComponent class AppComponent - inline template:4:3
  ORIGINAL EXCEPTION: Error: No XHR implementation has been provided. Can't read the url "app/dynamic/detail.view.html"
  ORIGINAL STACKTRACE:
  Error: No XHR implementation has been provided. Can't read the url "app/dynamic/detail.view.html"
  </code></pre>
  
  <p>It looks like during dynamic compilation Angular loses it's Xhr implementation so it can't load html-template through http.
  Can anybody help with it?</p>
  
  <p>You can find my example on <a href="http://plnkr.co/edit/eELABFic8ifQ0nZNL9wa?p=preview" rel="nofollow noreferrer">plunker</a>.
  version 3 - example with templateUrl(content isn't loaded dynamically)
  version 2 - example with in-line template(everythink works fine).</p>