title: How to pass directive name to template - Angular.js
body: <p>I have a directive that creates a bunch of similar widgets.  Each widget houses and different directive.  Here is the template that I use to create my widget: </p>
  
  <pre><code>template: '&lt;li&gt;&lt;div {{widgetModel.directiveName}}&gt;&lt;/div&gt;&lt;/li&gt;'
  </code></pre>
  
  <p>I am wanting the variables to be reconciled and or the template to declare the directive that needs to be used.  The template will then be:</p>
  
  <pre><code>template: '&lt;li&gt;&lt;div directive-name&gt;&lt;/div&gt;&lt;/li&gt;'
  </code></pre>
  
  <p>I then want it to act as a normal directive with an attribute name of <code>directiveName</code>.  This is not happening with the current code and I do not know how to make it behave like I need.  The directiveName directive can really be anything.  </p>