我正在尝试将变量从表传递到表单模态,因此需要一些关于代码片段的指导。请参阅 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>
myController.displayUserRecord(rec.sys_id)
请尝试这个