我需要将一个项目值从ng-repeat发送到一个函数作为参数..但我不能这样做..
我有这个:
<div ng-repeat="company in companies" class="col-sm-4 animated bounceInLeft">
<div class="panel panel-primary">
<div class="panel-heading">
<span class="glyphicon glyphicon-save"></span>
<span class="panel-title text" ng-bind="company.company"/>
<span class="pull-right" style="margin-left:1em;">
<img src="images/build/loading.gif" ng-show="waitingResponse"></span>
<input type="text" class="form-control-cool input pull-right" placeholder="Nueva categoria"
ng-model="worktype" name="worktype" id="worktype"/> <strong>
<span>
<button data-toggle="tooltip" title="Añadir tipo de trabajo"
ng-click="addWorktype(company._id)"
class="btn btn-header btn-link animated pulse-btn"
style="color:#ffffff; font-size:20px;">
<span class="glyphicon glyphicon-plus"></span>
</button>
</span></strong>
<span class="pull-right" style="margin-left:1em;">
</span>
<img src="images/build/loading.gif" ng-show="updatingWarehouses"></span>
</div>
但是,如果我将公司._id放在ng-click中,输入就不会出现在HTML中......有没有办法做到这一点..?