Skip to content

Instantly share code, notes, and snippets.

@udarapathmin
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save udarapathmin/b22bb4e6c47911dd51ee to your computer and use it in GitHub Desktop.
Save udarapathmin/b22bb4e6c47911dd51ee to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element" attributes="userid" noscript>
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_ajax {
left: 190px;
top: 160px;
position: absolute;
}
</style>
<core-ajax id="foobar"
auto="false"
url="http://tdslanka.com/tnsapi/api/treats/updateContact/format/json"
response="{{postsLoaded}}"
handleAs="json"
method="post"
params = {addr('new address'), tel('new telephone')}
>
</core-ajax>
<paper-fab mini icon="clear" class="blue" on-tap="{{ doSend }}"></paper-fab>
</template>
<script>
Polymer('my-element',{
doSend: function(event, detail, sender){
this.$.foobar.go();
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment