You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
I'm new in polymer. I'm working on an app using polymer and phonegap. I'm facing an issue in passing data from a polymer element to page. I have a polymer element that generate random data. On a button tap, a new page is called. I want that random generated data to be shown in called page.
My polymer element code is
<polymer-element name="person-card">
<template>
<div id="cardall">
<template repeat="{{ data }}">
<style>
...
</style>
<paper-shadow z="1" class="card">
<div vertical layout>
<div flex>
<core-icon icon="communication:location-on" class="icon-smaller"></core-icon>
<span class="info-bar">{{ ID }} {{ postingLocation }}</span>
</div>
<div>
<paper-button class="colored" on-tap="{{ showDetail }}" link="../www/Detail.html">
<core-icon icon="description"></core-icon>
 More Info
</paper-button>
<paper-button class="colored" on-tap="{{ tellUs }}">
<core-icon icon="create"></core-icon>
 Tell Us
</paper-button>
</div>
</div>
</paper-shadow>
</template>
</div>
</template>
<script>
Polymer('person-card', {
showDetail: function (e, detail, sender) {
window.location.href = e.target.getAttribute('link');
},
tellUs: function (e, detail, sender) {
},
ready: function () {
this.data = this.getData();
},
getData: function () {
var data = [];
//Sample Data For Testing
for (var i = 0; i < 50; i++) {
data.push({
ID: 'MI-' + Math.floor(Math.random() * (1000 - 1 + 1) + 1),
postingLocation: 'Random Location'
});
}
return data;
}
});
</script>
This is the page where data is to shown. The page is simple html page.
Hello,
I'm new in polymer. I'm working on an app using polymer and phonegap. I'm facing an issue in passing data from a polymer element to page. I have a polymer element that generate random data. On a button tap, a new page is called. I want that random generated data to be shown in called page.
My polymer element code is
This is the page where data is to shown. The page is simple html page.
Please help me out.
The text was updated successfully, but these errors were encountered: