Using Javascript with angularJs, I kind the following code :
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
In my App $scope.myObj.a[0].b is undefined with the ng-repeat (if I remove ng-repeat, it will be defined). In the plunkr it is defined even after the run of ng-repeat, but I managed to have the behaviour when I enter something in the input and then delete it.
I don't get what's hapening, I would like to understand why and if it is a good way to do ?