title: AngularJS - Using Partials Dynamically Within Other Partials
body: <p>I am relatively new to AngularJS and would like to know how feasible it is to pull in partial templates dynamically. Consider this abstracted (and simplified for this example) module. This itself would be a partial template that will be reused throughout the application.</p>
  
  <p><strong>Partial Module Markup</strong></p>
  
  <pre><code>&lt;div class="module"&gt;
      &lt;h2 class="module-title"&gt;{{module.title}}&lt;/h2&gt;
  
      &lt;div class="module-content"&gt;
          {{module.content}}
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>After fetching some data client side, I may wish for <code>module.content</code> to be a simple string of text, no problems there. What would be useful is if I could dynamically insert other partial templates into <code>module.content</code> based on the data I'm working with. Say for example in my response I have a list of headlines I wish to display, is is possible to pull in a partial template that handles headlines? And in another spot, <code>module.content</code> could be a partial template that handles a gallery of images.</p>
  
  <p>Any input or direction would be greatly appreciated!</p>