0
我要撥打的searchByID()當表單元格值反覆加載:PolymerJS:調用上載功能表元素
以下是我已經和我想搜索數據庫並返回值的ID。我所關心的是如何呈現的(這是由我的searchByID()完成)
代碼片段:
<template id="course-table-rows-template" repeat="{{item in response.entries}}">
<tr>
<td>
<a href="/#/course-details?lo_id={{item.id}}">{{item.id}}</a>
<form is="ajax-form" action="/add_to_wishlist?course_id={{item.id}}" method="get" id="add-course">
<button id="wishlist_add_button" on-click="{{handleWishlistClick}}">+ Wishlist</button>
</form>
</td>
<td>{{item.title}}</td>
<td>{{item.description}}</td>
<!--{{item.primary_category_id}}-->
<td>
<form is=""ajax-form" action="> How do I call the searchByID on load? I dont want to create a button and do an on click</form>
</td>
<td>{{item.primary_subcategory_id}}</td>
</tr>
</template>
我想要做的:使用item.primary_subcategory_id和查詢數據庫,並把在價值中。 LMK如果您需要更多解釋代碼。