나는 뭔가 잘못하고있는 느낌이 들지만,이 동작은 이상하게 보입니다. 동적으로 컨트롤러의 데이터를 기반으로 테이블을 만듭니다. 테이블에있는 셀 중 하나의 문자를 입력하면 즉시 다음 셀로 포커스가 변경되고 거기에 문자가 추가됩니다.Angularjs 테이블 셀 반복
jsfiddle에서 문제를 재현하는 매우 간단한 예가 있습니다.
http://jsfiddle.net/rgaskill/Aksec/15/
<div ng-app="miniapp">
<div ng-controller="Matrix">
<h1>Enter a value in the fist cell.</h1>
<table>
<thead>
<tr>
<th>Row Name</th>
<th>0</th>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(row, values) in valueMap">
<td>{{row}}</td>
<td ng-repeat="(col, val) in values" ><input type="text" ng-model="valueMap[row][col]"></input></td>
</tr>
</tbody>
</table>
</div>
</div>
이 이상한 행동의 원인이 무엇
var app = angular.module('miniapp', []);
function Matrix($scope) {
$scope.valueMap = {
aRow: {
'0': '',
'1': '',
'2': '',
'3': '',
'4': '',
'5': ''
}
};
}
?