not sure wether it should be posted here or not, but I'm not getting a response trigger from the byutv.
It does fetch the data correctly trough as seen trough google dev mode.
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../polymer-app/shared-styles.html">
<dom-module id="contact-pagina">
<template>
<style include="shared-styles">
:host {
display: block;
}
</style>
<byutv-jsonp
auto
id="ajax_members_get"
method="GET"
url="https://api.guildwars2.com/v2/guild/code/members"
params='{"access_token":"code"}'
handle-as="json"
last-response="{{_c_studenten}}"
on-response="members_get_response_handler">
</byutv-jsonp>
</template>
<script>
Polymer({
is: 'contact-pagina',
properties: {
c_visible: {
type: Boolean, /* true when element is the active visible item */
value: false,
observer: '_initializing',
},
},
_initializing : function() {
if (this.c_visible) {
console.log("about-pagina");
this.members_get_request_handler();
}
},
members_get_request_handler: function() {
console.log("members_get_request_handler");
this.$.ajax_members_get.contentType="application/json";
this.$.ajax_members_get.body={
};
this.$.ajax_members_get.generateRequest();
},
members_get_response_handler: function(request) {
console.log("members_get_response_handler aantal studenten="+request.detail.response.length);
this._c_studenten = request.detail.response;
},
});
</script>
</dom-module>