0
는 AngularJS와 함께 자바 스크립트를 사용하여 정의되고, 나는 종류 다음 코드를NG-모델
JS
$scope.myObj = {
'sthg': '',
'a': [{
'b' : ''
}]
}
HTML
<p ng-repeat="radio in fiche.radios">
<input type="text" ng-model="radio.code" placeholder="Numéro de cliché" ng-required="true" />
<span >
<button type="button"ng-click="removeRadioList($index);" ng-disabled="fiche.radios.length === 1">
<i>X</i>
</button>
</span>
</p>
http://plnkr.co/edit/LOgk7Nudse0srS7Bs1G6?p=preview
내 앱에서 $scope.myObj.a[0].b
은 ng-repeat (ng-repeat를 제거하면 정의 됨)와 함께 정의되지 않습니다. plunkr에서 ng-repeat를 실행 한 후에도 정의되지만 입력 내용을 입력 한 다음 삭제할 때 문제가 발생합니다.
나는 무슨 일이 일어나는지 모르겠다. 왜 그런지, 그리고 그것이 좋은 방법인지 이해하고 싶다.