Skip to content

Instantly share code, notes, and snippets.

@xseignard
Last active August 29, 2015 14:16
Show Gist options
  • Save xseignard/0f4a1ddc1a029f980d04 to your computer and use it in GitHub Desktop.
Save xseignard/0f4a1ddc1a029f980d04 to your computer and use it in GitHub Desktop.
polymer
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<polymer-element name="trakt-auth" attributes="">
<template>
<link rel="stylesheet" href="trakt-auth.css">
<core-ajax
url="http://gdata.youtube.com/feeds/api/videos/"
params='{"alt":"json", "q":"chrome"}'
handleAs="json"
on-core-response="{{handleResponse}}">
</core-ajax>
<paper-button on-click="{{onClick}}">Test</paper-button>
</template>
<script>
(function () {
Polymer({
onClick: function() {
var ajax = this.shadowRoot.querySelector('core-ajax');
console.log(ajax);
},
handleResponse: function(response) {
console.log(response);
}
});
})();
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment