title: Access local scope variable inside template as a variable instead of string
body: <p>I'm creating a directive where I have a scope(local) with a variable <code>type</code> and with that value I should return the appropriate template. <code>chooseTemplateByType</code> returns a string with the appropriate template based on that <code>type</code> which could be a <code>text_field</code> for example.</p>
  
  <pre><code>template:
    chooseTemplateByType(type)
  </code></pre>
  
  <p>The question is how to access that variable type of my local scope so I can pass the value into my function <code>chooseTemplateByType</code></p>