javascript - recibe ng-repeat for add to array -




i have user list , want add 5 new values not recognize them.

<tr ng-repeat="users in usersdata">     <td>         {{ $index + 1 }}     </td>     <td>         {{ users.id }}     </td>     <td>         {{ users.apellidos }}     </td>     <td>         {{ users.nombres }}     </td>     </td>      <td>         <input class="form-control" type="checkbox" style="width: 100px;" ng-model="users.desayuno" ng-checked="true">     </td>     </td>     <td>         <input class="form-control" type="checkbox" style="width: 100px;" ng-model="users.almuerzo" ng-checked="true">     </td>     </td>     <td>         <input class="form-control" type="checkbox"  style="width: 100px;" ng-model="users.te" ng-checked="true">     </td>     </td>     <td>         <input class="form-control" type="checkbox" style="width: 100px;" ng-model="users.cena">     </td>     </td>     <td>         <input class="form-control" type="checkbox" style="width: 100px;" ng-model="users.amanecida">     </td> </tr> 

well need 5 values of repeat users.desayuno, users.almuerzo, etc. can obtain when click button.

<div class="row">   <button ng-click="savedatadining()" class="btn btn-lg btn-primary">     agregar   </button> </div> 

here code of mi button:

$scope.savedatadining = function () {   angular.foreach($scope.usersdata, function(obj)   {     console.log(obj);   }); }; 

the data obtain: enter image description here have problem in plunker: https://plnkr.co/edit/thnhkqobkjrtuefmi19o?p=preview





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -