[英]Oracle JET - my oj-list-view isn't working
我有一個基本的oj-list-view
元素,其中包含一些靜態數據。 據我所知,我已經正確實現了它,請確保在dataSource
包括所有相關變量。 然而,該元素顯示了加載符號,而控制台僅顯示了oj.Collection
的錯誤。 我的錯誤在哪里?
HTML
<oj-list-view id="listview" aria-label="list using json data"
data="[[dataSource]]" selection-mode="single" drill-mode="none">
<template slot="itemTemplate">
<div>
<span data-bind="text: text1"></span>
<span data-bind="text: text2"></span>
</div>
</template>
</oj-list-view>
JS
var data = [{"text1": "cat", "text2":"meow"},
{"text1":"dog", "text2":"woof"}];
self.dataProvider = new oj.ArrayDataProvider(data, null );
template
標記僅在Oracle Jet 4.1版中引入。 您可以嘗試將項目版本更改為4.1,也可以使用列表模板的script
標簽。
這是列表模板的鏈接- 點擊我 :)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.