Skip to content

Instantly share code, notes, and snippets.

@keanulee
Created June 9, 2017 22:51
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 keanulee/68b1d4e9a82f76c011391bd6cc7e3902 to your computer and use it in GitHub Desktop.
Save keanulee/68b1d4e9a82f76c011391bd6cc7e3902 to your computer and use it in GitHub Desktop.
{
"name": "iron-list-448",
"private": true,
"dependencies": {
"iron-list": "polymerelements/iron-list#^2.0.0",
"polymer": "polymer/polymer#^1.9",
"paper-card": "polymerelements/paper-card#^2.0.0"
},
"resolutions": {
"webcomponentsjs": "^0.7.24"
}
}
<link rel="import" href="my-app.html">
<my-app></my-app>
<link rel="import" href="bower_components/polymer/polymer.html">
<link rel="import" href="bower_components/iron-list/iron-list.html">
<link rel="import" href="bower_components/paper-card/paper-card.html">
<dom-module id="my-app">
<template>
<iron-list id="listbox" items="[[data]]" as="item">
<template>
<paper-card heading="[[item.firstName]]" image="" elevation="1" animated-shadow="false">
<div class="card-content"></div>
<div class="card-actions"></div>
</paper-card>
</template>
</iron-list>
</template>
<script>
Polymer({
is: 'my-app',
properties: {
data: {
type: Object,
value: () => [
{"firstName":"John", "lastName":"Smith"},
{"firstName":"Jane", "lastName":"Doe"}
]
}
}
});
</script>
</dom-module>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment