将变量从 HTML 页面传递到 Form-Modal

问题描述 投票:0回答:1

我正在尝试将变量从表传递到表单模态,因此需要一些关于代码片段的指导。请参阅 HTLML 部分。 我需要将

{{rec.sys_id}}
作为参数传递到方法中,该方法位于此表单模式中:

"myController.displayUserRecord(<rec.sys_id>)"

请让我知道该方法。 谢谢你。

<table>
    <tr ng-repeat="rec in myController.userRecord">
     <td><a ng-href="" target="" data-toggle="modal" data-target="#formUserRecord">Click Here</a></td>
     <td>{{rec.sys_id}}</td>
    </tr>
 </table>


 <div  class="modal fade" id="formUserRecord" tabindex="-1" role="dialog">
    <p>Check your Workday Record:</p>
    <button type="button" ng-click="myController.displayUserRecord(<rec.sys_id>)">Click here </button>
</div>
javascript html angular modal-dialog servicenow
1个回答
0
投票

myController.displayUserRecord(rec.sys_id)

请尝试这个

© www.soinside.com 2019 - 2024. All rights reserved.