小编Ade*_*han的帖子

如何获取数组 ng-repeat 的最后一个索引

如何使用 ng-repeat 指令获取数组最后一个索引 + 1 ?动态 Profile.addresses[2].site_name

<tr ng-repeat="lines in array">
  <td>
    <input type="text" class="form-control" id="inputDefault" ng-model=' Profile.addresses[2].site_name ' name='site_name'>
  </td>
  <td>
    <input type="text" class="form-control" id="inputDefault" ng-model=' Profile.addresses[2].street_address ' name='street_address'>
  </td>
  <td>
    <input type="text" class="form-control" id="inputDefault" ng-model=' Profile.addresses[2].city ' name='city'>
  </td>
  <td>
    <input type="text" class="form-control" id="inputDefault" ng-model=' Profile.addresses[2].state ' name='state'>
  </td>
  <td>
    <input type="text" class="form-control" id="inputDefault" ng-model=' Profile.addresses[2].country ' name='country'>
  </td>
  <td>
    <input type="text" class="form-control" id="inputDefault" ng-model=' Profile.addresses[2].zip_code ' name='zip_code'>
  </td>
  <td>
    <input type="text" class="form-control" id="inputDefault" ng-model=' Profile.addresses[2].phone_number ' name='phone_number'> …
Run Code Online (Sandbox Code Playgroud)

angularjs angularjs-scope

0
推荐指数
1
解决办法
4736
查看次数

标签 统计

angularjs ×1

angularjs-scope ×1