Hi Daniel,

Thank you so much for taking the time helping me look into this problem. To 
answer your first question, I have a post.js class running on server side 
which will render the items list (in JSON format as I shown previously) on 
the posts object. The code is shown as following.

exports.list = function(req, res){
scan(function(items){
res.render('post', {title:'Title', posts : items });
});
};

BR/Roger

Daniel Llewellyn於 2016年12月13日星期二 UTC+8上午1時42分53秒寫道:
>
> On Mon, 12 Dec 2016 at 10:08 <hsi...@gmail.com <javascript:>> wrote:
>
>> Hi,
>>
>> Only few posts about this topic on Stackoverflow so I came here for help. 
>> Many people believe it is due to JSON format is incorrect as result of 
>> parsing failure. However, I spent quite some time double check to ensure my 
>> data format can meet JSON standard. I even verified my data with 
>> JSON.parse() and the return result is okay. But putting the same data 
>> object on HTML calling iron-list tag simply doesn't work. I believe there 
>> is a flaw on the array call itself while the return error message doesn't 
>> provide more details. Please someone help me here or I might have give up 
>> using this wonderful web element. Thanks.
>>
>> <iron-list items="[[posts]]" as="item">
>>       <template>
>>
>
> Please show where you get the posts variable from, where you assign it 
> into the variable called posts, etc. It is unclear what this variable looks 
> like without those details. Also beneficial would be a `console.log(typeof 
> posts, posts);` output to verify what it contains.
>
> By using  <%= posts %> tag on my html, I can see the correct 
>> representation of my JSON data.
>>
>
> I don't know what <%= posts %> means, but it definitely is not 
> Polymer-enhanced-HTML or plain-HTML.
>
>  [{"Name":"aaa","Address":"bbb","Phone":"1111"},
>> {"Name":"ccc","Address":"ddd","Phone":"2222"},
>> {"Name":"eee","Address":"fff","Phone":"3333"}]
>>
>
> That data looks fine.
>
> Dan. 
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/59476b77-baff-41bb-a871-e00b2a478caa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to