title: AngularJS: Wrapping Directives and passing the attributes
body: <p>I am looking for a way to extend or wrap a third-party directives html with Angular 1.5.</p>
  
  <hr>
  
  <p>Given a directive</p>
  
  <pre><code>&lt;lib-input&gt;&lt;/lib-input&gt;
  </code></pre>
  
  <p>I want to create a directive <code>&lt;my-lib-input&gt;</code> which renders the following HTML:</p>
  
  <pre><code>&lt;div&gt;
      &lt;my-directive&gt;&lt;/my-directive&gt;
      &lt;lib-input ng-if="vodoo()"&gt;&lt;/lib-input&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Which is supposed to be used in the same way as the original directive.</p>
  
  <hr>
  
  <p><strong>Example</strong></p>
  
  <p>To use my directive in the same way as the original, i need to move all attributes to a specific node of my template:</p>
  
  <pre><code>&lt;my-lib-input ng-model="model" ng-change="ctrl.onChange()"&gt;&lt;/my-lib-input&gt;
  </code></pre>
  
  <p>should generate:</p>
  
  <pre><code>&lt;div&gt;
      &lt;my-directive&gt;&lt;/my-directive&gt;
      &lt;lib-input ng-if="vodoo()" ng-model="model" ng-change="ctrl.onChange()"&gt;&lt;/lib-input&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However angular applies all the attributes to the root-node (here: the <code>div</code>) by default.</p>
  
  <p><strong>Question</strong></p>
  
  <p>How do I apply all parameters/ attributes which are passed to my directive to a specific node of the template? </p>
  
  <hr>
  
  <p>I would like to prevent hardcoding a list of available parameters in my directive like:</p>
  
  <pre><code>restrict: 'E',
  scope : {
      ngModel: '=',
      ngChange: '&amp;',
      ...    
  }
  </code></pre>