Hi am trying to rean an external json file as response to an ajax call. But
am not able to display the value from json in template using binding. Am
using polymer 1.0
<template>
<iron-ajax
auto
url:"http://localhost:3000/input.json",
method:'GET',
dataType: "json",
last-response="{{ajaxResponse}}">
</iron-ajax>
<textarea value="{{ajaxResponse.degree}}"></textarea>
</template>
<script>
Polymer({
is: 'gauge-ajax'
},
ajaxResponse: function(request) {
console.log(request.detail.response);
console.log(this.$.ajax.lastResponse);
}
</script>
The text area displaye "undefined"
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/a9c172a1-01eb-4ec9-a2b7-7a72c344ffeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.