title: AngularJS Multiple Transclusion
body: <p>I have an AngularJS directive with multiple transclusions and one transclusion slot is wrapped by a form. </p>
  
  <p>Everything is working fine except for the form validation messages.</p>
  
  <p><strong>The directive template:</strong></p>
  
  <pre><code>&lt;ng-form name="nbcardform" ng-submit="submit()" novalidate&gt;
      &lt;ng-transclude ng-transclude-slot="back"&gt;&lt;/ng-transclude&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-xs-12"&gt;
              &lt;button type="submit"&gt;Save&lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/ng-form&gt;
  </code></pre>
  
  <p>Here is an example of the <strong>directive usage</strong>:</p>
  
  <pre><code>&lt;nb-card&gt;
      &lt;nb-card-back&gt;
          &lt;input type="text" name="username" ng-model="vm.username" required&gt;
          &lt;div ng-messages="nbcardform.username.$error" role="alert"&gt;
              &lt;div ng-message="required"&gt;Required field&lt;/div&gt;
          &lt;/div&gt;
      &lt;/nb-card-back&gt;
  &lt;nb-card&gt;
  </code></pre>
  
  <p>For some reason the expression <code>nbcardform.username.$error</code> is undefined. </p>
  
  <p>Can someone help me with this?</p>