<td>
<select ng-options="user.username as user.username for user in dptUsers"
ng-model="newResponsible" data-ticketID='{{ticket._id}}'
ng-click='editResponsible(newResponsible, <<<<>>>>)'>
{{user.username}}
</select>
</td>
如何将我的 data-ticketID 传递到我的 editResponsible(a, b) 函数中?
最佳答案
您可以直接在 ng-click
中传递该变量
ng-click='editResponsible(newResponsible, ticket._id)'
关于javascript - 如何在 Angular 中将数据发送到 ng-click 函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32210985/