Last active
August 29, 2015 14:16
-
-
Save xseignard/0f4a1ddc1a029f980d04 to your computer and use it in GitHub Desktop.
polymer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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