title: AngularJS and generated elements
body: <p>We have some third party javascript components that are generating some html elements. I'd like to couple it with AngularJS.</p>
  
  <p>I've tried this code </p>
  
  <pre><code>&lt;div ng-controller="ExpensesCtrl"&gt;
      &lt;form id="expensesform"&gt;
          &lt;input type="text" ng-model="expense.name" /&gt;
          &lt;input type="text" ng-model="expense.amount" /&gt;
      &lt;/form&gt;
      &lt;button ng-click="add()"&gt;Add&lt;/button&gt;expense | json
  &lt;/div&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>function ExpensesCtrl($scope) {
  
      $scope.expense = {};
      $scope.add = function () {
          $("#expensesform").append("&lt;input type='text' ng-model='expense.age' /&gt;");
      };
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/tChNh/" rel="nofollow">http://jsfiddle.net/tChNh/</a></p>
  
  <p>but it doesn't work like excepted.</p>
  
  <p>Is there any chance to get this working ?</p>