gpt4 book ai didi

knockout.js - 您如何在 knockout 模板中控制台登录

转载 作者:行者123 更新时间:2023-12-03 14:37:54 27 4
gpt4 key购买 nike

我认为这是正确的:

            <div data-bind="foreach: amount_options, visible: $parent.displayAskAmoutRadioButtons()">
<!-- ko console.log(amount_option) --><!-- /ko -->
<label class="donor-js-amount-choice">
<!-- <input type="radio" class="donor-js-webware" name="gift_amt" data-bind="attr: {value: key}, checked: $parent.amountSelected"><span class="donor-js-currency-symbol" data-bind="html: $root.session.currencySymbol"></span>&nbsp;<span class="donor-js-input-currency" data-bind="text: desc"></span>&nbsp;<span class="donor-js-input-currency"></span><br> -->
</label>
</div>

显然不是因为没有任何东西被放到控制台上。被注释掉的标签行抛出关于 value: key 的错误。我需要知道其中一个 amount_options 里面有什么.

想法?

最佳答案

试试这个。 Knockout 应该评估绑定(bind)的值并刷新到控制台。

<div data-bind="text: console.log(amount_option)"></div>

关于knockout.js - 您如何在 knockout 模板中控制台登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35109051/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com