gpt4 book ai didi

javascript - 如何在 Angular 中将数据发送到 ng-click 函数?

转载 作者:行者123 更新时间:2023-12-03 09:04:58 25 4
gpt4 key购买 nike

<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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com