Knockout.jsでMVC3を使用していて、テンプレートでdata-bind=addContributeを使用してAPIからボタンにデータを添付したいと考えています。このボタンはポップアップボックスを開くはずで、そのポップアップに添付されたボタンデータが必要です。これどうやってするの?
私のテンプレート:
<div>
        <ul data-bind="template: {name: 'membersTemplate', foreach: viewModel.membersList}">
        </ul>
</div>
<script id="membersTemplate" type="text/html">
    <li>
        <div class="fl width165">
            <img src=" ${ image } " width="33" height="34" />
            <span> ${ memberName } </span>
            ${ memberType }
        </div>
        <aside class="fr margint10">
            <label> ${ contributions } </label>
            <a href="#" class="sprite-add_img" id="openContribute" title="Add Contributes to Goals" data-bind="click: viewModel.addContribute" ></a>
        </aside>
    </li>
</script>