title: Rendering an amp document in a shell page
body: <p>I am trying to render an amp doc similar to <a href="https://codelabs.developers.google.com/codelabs/amp-in-pwa/#6" rel="nofollow noreferrer">https://codelabs.developers.google.com/codelabs/amp-in-pwa/#6</a></p>
  
  <p>When I do </p>
  
  <pre><code>fetchDocument(url).then(function(doc) {
          // Let AMP take over and render the page
          var ampedDoc = AMP.attachShadowDoc(container, doc, url);
          ampedDoc.close();
  
      });
  </code></pre>
  
  <p>the amp doc (fetched from url) is placed in the container but amp-tags are not rendered.</p>
  
  <p>For example: <code>amp-img</code> tag is in the sources but it does not render as an img tag in the way "Googe Search" does when it renders that doc.</p>
  
  <p><strong>Question</strong>: Is there a way to render amp-components when loading amp documents with <code>https://cdn.ampproject.org/shadow-v0.js</code></p>