getting data from the model which is in nested ng-repeat

11 views
Skip to first unread message

Suresh Murthy

unread,
May 5, 2016, 1:15:39 AM5/5/16
to AngularJS
how can i get the data from the textbox in the given example

<table border=1>  
    <tbody ng-repeat="group in groups">
      <tr>
        <td colspan="2">{{group.name}}</td>
      </tr>
      <tr>
        <th>Name</th>
        <th>Gender</th>
      </tr>
      <tr ng-repeat="member in group.members">
        <td><input  type="text" ng-model="member.name" /></td>
        <td><input  type="text" ng-model="member.gender" /></td>
      </tr>  
    </tbody>
<tr>
  <td>
<input type="button" ng-click="getDetailssample();" />
</td>
 </tr>
  </table>

Антон Цепковский

unread,
May 5, 2016, 3:07:49 AM5/5/16
to AngularJS
$scope.group[0].member[0].name

Антон Цепковский

unread,
May 5, 2016, 3:09:04 AM5/5/16
to AngularJS
*groups
*members
Reply all
Reply to author
Forward
0 new messages