나는 개체를 전달하기 위해 ng-repeat를 통해 제어되는 < tr>을가집니다. < td> 요소 중 하나는 텍스트 필드이며 $ 범위에 텍스트 줄 수를 반환하는 함수가 있습니다. 이제 다른 < TD에> 같은 행에, 나는 텍스트 필드의 라인을 가지고만큼 선택 상자를 추가 할, 그래서 나는이 같은 시도 : 난 그냥 하나 얻고있다AngularJS는 다른 기준으로 td를 수정합니다.
<table>
<tr ng-repeat="variable in variables">
<td>
<label for="varValues">Choices:</label>
<textarea class="form-control" ng-model="variable.extras" id="varValues" cols="40" rows="5">{{variable.extras}}</textarea>
</td>
<td>
<table>
<tr element-repeat="numberOfRowsForChoiceVariable(variable)">
<select class="form-control" ng-options="">
<option value="">-- Default Skill --</option>
</select>
</tr>
</table>
</td>
을 < 두 번째 열의 select> 요소. 해당 텍스트 필드의 내용을 변경하면 어떻게 다시 평가됩니까?
그리고 'numberOfRowsForChoiceVariable()'은 (는) 어떤 모양입니까? – isherwood
변수의 행 수에 따라 원하는 숫자 선택 상자를 반환합니다. 텍스트 모델 – Scott
해당 tr은 실제로 올바른 횟수만큼 반복되는 ng-repeat 여야합니다. 그러나 variable.extras가 변경 될 때마다 어떻게 td 요소를 다시 작성해야합니까? – Scott