2

我以前在 Angular 工作,现在我开始接触剑道。我正在寻找剑道中的 ng-repeat(Angular) 之类的东西。当我想从数据源(文章、按钮、图片等)动态重复某些内容时,我会使用 unorderedList 和 listItem 模板模拟转发器。

下面的代码中有 radioButton 中继器:

<ul data-role="listview" data-bind="source: array" data-template="ul-template"></ul>
<script id="ul-template" type="text/x-kendo-template">
    <li>
        <input type="radio" data-bind="attr:{name:name, id:id}, value:val, checked:selectedValue />
        <label data-bind="text:label, attr:{for:id}"></label>
    </li>
</script>

我认为它不像 ng-repeat 那样不舒服。

任何人都可以为这个问题提出正确的方法吗?

4

0 回答 0