title: Cannot handover attrs.value to Directive's templateUrl function
body: <p>Using Angular 1.6 I am defining an directive like so:</p>
  
  <pre><code>angular
      .module('myApp')
      .directive('lyEntity', lyEntity);
  
  function lyEntity() {
      return {
          restrict: 'E',
          scope: {
              model: '=',
              type: '@'
          },
          controller: 'lyEntityController',
          controllerAs: 'vm',
          bindToController: true,
          templateUrl: function (elem, attrs) {
              return 'components/_templates/' + attrs.type + '.html'
          }
      };
  }
  </code></pre>
  
  <p>But using it in another template like so:</p>
  
  <pre><code>&lt;ly-entity model="vm.entity" type="{{vm.type}}"&gt;&lt;/ly-entity&gt;
  </code></pre>
  
  <p>will result in templateURL <code>components/_templates/{{vm.type}}.html</code></p>
  
  <p>How can I hand over the value of <code>vm.type</code> to be used in my <code>templateUrl</code> function?</p>