Как передать параметр foreach как параметр метода?Как передать экземпляр foreach в качестве параметра метода?
В приведенном ниже коде, как передать экземпляр foreach currentFeature
в $root.enableDemote(currentFeature)
. Передача его как $root.enableDemote(currentFeature)
не работает. Любые сугубости?
<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 –
спасибо за добрые слова :) – TSV