有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

javascript如何使用角度过滤thymeleaf列表

我正在尝试添加基于thymeleaf的网站,并希望添加基于用户输入的内容,以过滤给定列表。我尝试了很多方法,但我遇到了麻烦,所以如果有人能告诉我如何将数据传递给Angular,那就太棒了

这是thymeleaf中的列表/表格:

<table class="table table-striped">
        <tr>
            <th>ID</th>
            <th>Manufacturer</th>
            <th>Type</th>
            <th>Characteristics</th>
            <th class="text-center">Quantity</th>
            <th class="text-center" colspan="2">Administration Actions</th>
        </tr>
        <th:block th:each="item, iterStat : ${list}" varStatus="status">
            <tr>
                <td th:text="${iterStat.count}"></td>
                <td th:text="${item.manufacturer.name}"></td>
                <td th:text="${item.type}"></td>
                <td th:text="${item.characteristics}"></td>
                <td class="text-center" th:text="${item.quantity}"></td>
                <td class="text-center"><a th:href="@{${'fuses/' + item.id}}"
                    class="btn btn-warning btn-sm"> <span
                        class="glyphicon glyphicon-edit"></span> Edit
                </a> <a th:href="@{${'fuses/' + item.id + '/delete'}}"
                    class="btn btn-danger btn-sm"> <span
                        class="glyphicon glyphicon-trash"></span> Delete
                </a></td>

            </tr>
        </th:block>
</table>

我不确定是否需要更多数据,这是我使用的模拟搜索段落:

<p>Type a letter in the input field:</p>
<p>
    <input type="text" ng-model="test">
</p>

我想按制造商筛选列表


共 (0) 个答案