Skip to content

Instantly share code, notes, and snippets.

@Analect
Last active August 29, 2015 14:07
Show Gist options
  • Save Analect/27fb4ad579d8d2eea84a to your computer and use it in GitHub Desktop.
Save Analect/27fb4ad579d8d2eea84a to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-ajax/core-ajax.html">
<polymer-element name="albums-wall" attributes="url">
<template>
<style>
</style>
<core-ajax url="{{ }}" handleas="json" auto response='{{ $.albums.response["subsonic-response"] }}' method="GET" id="core_ajax"></core-ajax>
<template id="albums" repeat="{{response.subsonic-response.albumList2.album}}"></template>
</template>
<script>
Polymer({
responseChanged: function (e) {
var albums = this.response;
console.log(albums);
},
url: 'http://subsonic.org/restapi',
response: null
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment