title: angular, in directive, adding to the template an element with ng model
body: <p>I'm trying to add an input element with ng-model inside a directive.</p>
  
  <p><a href="http://jsfiddle.net/Ajsy7/1/" rel="noreferrer">my code</a></p>
  
  <p>the link function of my directive:</p>
  
  <pre><code>link: function (scope, element, attrs) {
          var elem_0 = angular.element(element.children()[0]);
          for (var i in scope.animals[0]) {
              elem_0.append(angular.element('&lt;span&gt;' + scope.animals[0][i].id + '&lt;/span&gt;'));
  
              //this part doesn't work
              var a_input = angular.element('&lt;input type="text"&gt;');
              a_input.attr('ng-model', 'animals[0][' + i + '].name');
              //end
              elem_0.append(a_input);
          }
  </code></pre>
  
  <p>it seems i need to call $compile() at the end, but have no idea how.</p>