title: Directive, wrap content and keep attributes on original element
body: <p>I have a bit of trouble creating a directive that wraps the element (and its children) that the directive is applied to. I don't get why this seemingly common scenario should be so difficult considering how easy many other commonplace things are in AngularJS, so it could very well be that I'm missing something here.</p>
  
  <p>What I want to do is to wrap a select element in a div.
  I'm using transclude to preserve the original select element and its content but I can't get it to work correctly.</p>
  
  <p>The HTML looks like this:</p>
  
  <pre><code>&lt;select mlb-select ng-options="opt.val as opt.text for opt in mlb" ng-model="mlbOpt"&gt;&lt;/select&gt;
  </code></pre>
  
  <p>and my directive looks like this:</p>
  
  <pre><code>directiveModule.directive("mlbSelect", function(){
      return {
          template: '&lt;div class="mlb-select"&gt;'
                      + '&lt;select ng-transclude&gt;&lt;/select&gt;'
                      + '&lt;/div&gt;',
          transclude: 'element',
          replace: true
      }
  });
  </code></pre>
  
  <p>The resulting HTML looks like this:</p>
  
  <pre><code>&lt;div class="mlb-select ng-pristine ng-valid" mlb-select ng-options="opt.val as opt.text for opt in mlb" ng-model="mlbOpt"&gt;
      &lt;select ng-transclude class="ng-scope"&gt;&lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Of course, this is not what I want. Why are the properties of my select element added to the wrapping div and not the element I specify with the ng-transclude attribute? The select element needs to retain the ng-options and ng-model properties.</p>
  
  <p>What do I need to do to accomplish this?</p>