title: AngularJS: Fields added dynamically are not registered on FormController
body: <p>I have the following <strong>static</strong> form in AngularJS:</p>
  
  <pre><code>&lt;form name="myForm" class="form-horizontal"&gt;
  
    &lt;label&gt;First Name:&lt;/label&gt;
    &lt;input type="text" name="first_name" ng-model="entity.first_name"&gt;
  
    &lt;label&gt;Last Name:&lt;/label&gt;
    &lt;input type="text" name="last_name" ng-model="entity.last_name"&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>Angular creates a FormController for me and publishes it into the scope (under the form name). Which means I have access to properties like the following:</p>
  
  <pre><code>$scope.myForm.first_name.$error
  $scope.myForm.last_name.$invalid
  ...
  </code></pre>
  
  <p>This is super useful!</p>
  
  <p>But in my case I'm building a form <strong>dynamically</strong>, using directives:</p>
  
  <pre><code>&lt;form name="myForm" class="form-horizontal"&gt;
  
    &lt;field which="first_name"&gt;&lt;/field&gt;
    &lt;field which="last_name"&gt;&lt;/field&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>The <code>&lt;field&gt;</code> directives don't resolve to actual <code>&lt;input&gt;</code> elements until after a while (after I've fetched some data from the server, linked the directives, etc.).</p>
  
  <p>The problem here is that no field properties are defined on the form controller, as if dynamic fields didn't register with the FormController:</p>
  
  <pre><code>// The following properties are UNDEFINED (but $scope.myForm exists)
  $scope.myForm.first_name
  $scope.myForm.last_name
  </code></pre>
  
  <p>Any idea why? Any solution/workaround?</p>
  
  <p>You can see the entire code in this jsFiddle:<br>
  <a href="http://jsfiddle.net/vincedo/3wcYV/">http://jsfiddle.net/vincedo/3wcYV/</a></p>