【发布时间】:2016-11-03 03:43:25
【问题描述】:
聚合物新手在这里..
尝试通过获取其 JSON 数据,为 Google 表格文档中的数据设置一些 HTML 的转发器。
我正在尝试使用:
// Load the JSON file from Google
<iron-ajax auto url="https://spreadsheets.google.com/feeds/list/1jJxd4Q3MzZLxMZ4pO9E56UL4eZInuPNwUdrFXk9qds8/od6/public/values?alt=json"
handle-as="json"
last-response="{{data}}"></iron-ajax>
//Create the HTML repeater to list the image items
<template is="dom-repeat" items="{{data}}">
<a href="{{feed.entry.item.gsx$imageurl.$t}}"><img src="{{feed.entry.item.gsx$imagethumburl.$t}}" data-big="{{feed.entry.item.gsx$imageurl.$t}}" data-title="{{feed.entry.item.gsx$imagetitle.$t}}" data-description="{{feed.entry.item.gsx$imagecaption.$t}}" ></a>
</template>
但是,我似乎无法在 JSON 提要中定位>entry>行号
我的控制台一直在说:
polymer-micro.html:277 [dom-repeat::dom-repeat]:items 的预期数组,找到对象 {版本:“1.0”,编码:“UTF-8”,提要:对象}
任何帮助将不胜感激!
【问题讨论】:
标签: json google-sheets polymer