Last active
August 29, 2015 14:15
-
-
Save windlessuser/465fd1e7a8a36e7dbc9b to your computer and use it in GitHub Desktop.
designer
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="../core-ajax/core-ajax.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
box-sizing: border-box; | |
} | |
#core_ajax { | |
left: 300px; | |
top: 170px; | |
position: absolute; | |
} | |
</style> | |
<core-ajax url="https://shipstream-server.herokuapp.com/customers" handleas="json" response="{{ response }}" loading method="GET" id="ajaxtest" on-core-response="{{ handle }}" hidden></core-ajax> | |
<div id="result"></div> | |
<button id="button" on-click="{{get}}">Press Me</button> | |
</template> | |
<script> | |
Polymer({ | |
handle: function () { | |
console.log(this.$.ajaxtest.response); | |
this.$.result.innerHTML = JSON.stringify(this.response); | |
}, | |
response: null, | |
get: function(){ | |
this.$.ajaxtest.go(); | |
} | |
}); | |
</script> | |
</polymer-element> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment