title: How to Copy Attributes to Inner Element
body: <p>I'm writing a very simple directive for AngularJS that is supposed to transform something like this:</p>
  
  <pre><code>&lt;input type="text" name="FirstName" mydirectivename /&gt;
  </code></pre>
  
  <p>Into something like this:</p>
  
  <pre><code>&lt;span&gt;&lt;input type="text" name="FirstName" /&gt;&lt;/span&gt;
  </code></pre>
  
  <p>It was easy enough to get here:</p>
  
  <pre><code>&lt;span type="text" name="FirstName"&gt;&lt;input/&gt;&lt;span&gt;
  </code></pre>
  
  <p>But now I'm down in the weeds writing a compile function doing things that the documentation says "you should rarely need to do" and I'm thinking I'm off track. Is there a simple way to indicate that a specific element in a template should be the target of copied attributes?</p>
  
  <p>Thanks</p>