title: Angular Directive Different Template
body: <p>I have a directive myDirective with variable type. If I run <code>&lt;my-directive type="X"&gt;</code> I want the directive to use templateUrl: x-template.html. 
  If I do <code>&lt;my-directive type="Y"&gt;</code> I want the directive to use templateUrl: y-template.html. </p>
  
  <p>This is my current directive. </p>
  
  <pre><code>app.directive('myDirective', function() {
      var myDirective = {
          templateUrl: 'X-template.html',
          restrict: 'E',
          scope: {
              type: '=' 
          },
      };
      return myDirective;
  });
  </code></pre>
  
  <p>I read thru stackoverflow and angular documentation but have not found anything that I need. </p>
  
  <p>I am now trying to do something along the lines of: </p>
  
  <pre><code>if ($scope.type === 'X') {
      templateUrl: 'X-template.html',
  }
  else if ($scope.type === 'Y') {
      templateUrl: 'Y-template.html',
  }
  </code></pre>
  
  <p>But do not know where to do it. </p>
  
  <p>Do you guys know if this is possible and how?</p>