0
如何通过foreach实例作为方法参数?如何通过foreach实例作为方法参数?
在下面的代码中,我如何将每个实例currentFeature
传递给$root.enableDemote(currentFeature)
。将它作为$root.enableDemote(currentFeature)
传递不起作用。任何sugegstions?
<tbody data-bind="foreach: { data: features, as: 'currentFeature' }">
<tr>
<td style="width: 8px;">
<button type="button" id="exposureDetailDemoteButton" class="btn btn-default fe-margin" data-bind="click: $root.demoteExposure, enable: $root.enableDemote(currentFeature)" data-toggle="tooltip" title="Demote Feature Exposure"><span class="glyphicon glyphicon-backward"></span></button>
</td>
</tr>
</tbody>
完美。 st.fwd – 2015-02-12 07:23:19
非常感谢你:) – TSV 2015-02-12 07:33:46