title: How to generates dynamically ng-model="my_{{$index}}" with ng-repeat in AngularJS?
body: <p>I would like to ask you if you can give me a hand on this.</p>
  
  <p>I have created a jsfiddle with my problem <a href="http://jsfiddle.net/3jLRJ/">here</a>. I need to generate dynamically some inputs with ng-model in a ng-repeater using the way ng-model="my_{{$index}}".</p>
  
  <p>In jsfiddle you can see that everything it's working fine until I try to generate it dynamically.</p>
  
  <p>The html would be:</p>
  
  <pre><code>&lt;div ng-app&gt;
  &lt;div ng-controller="MainCtrl"&gt;
  &lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&gt;
    &lt;tr&gt;
      &lt;td&gt;
        &lt;select ng-model="selectedQuery" 
          ng-options="q.name for q in queryList" &gt;
          &lt;option title="---Select Query---" value=""&gt;---Select Query---&lt;/option&gt;
        &lt;/select&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr ng-repeat="param in parameters"&gt;
      &lt;td&gt;{{param}}:&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" ng-model="field_X" /&gt;field_{{$index}}&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;div&gt;
  &lt;div&gt;
  </code></pre>
  
  <p>And the javascript...</p>
  
  <pre><code>function MainCtrl($scope) {
   $scope.queryList = [
      { name: 'Check Users', fields: [ "Name", "Id"] },
      { name: 'Audit Report', fields: [] },
      { name: 'Bounce Back Report', fields: [ "Date"] } 
    ];
  
  $scope.$watch('selectedQuery', function (newVal, oldVal) {
      $scope.parameters = $scope.selectedQuery.fields;
    });
  }
  </code></pre>
  
  <p>Can you give me any idea?</p>
  
  <p>Thanks a lot.</p>