Initiates repo

This commit is contained in:
Julien Lengrand-Lambert
2017-08-16 16:28:41 +02:00
commit 641312b4c0
7 changed files with 2010 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<link rel="import" href="/polymer/polymer.html">
<link rel="import" href="/components/another-component/another-component.html">
<dom-module id="example-component">
<template>
<style>
:host {
display: block;
}
</style>
<h1>Example</h1>
<h2>List of elements</h2>
<template is="dom-repeat" items="{{elements}}" as="item" indexAs="index">
<another-component element="{{item}}" ident$="{{index}}"></another-component>
</template>
</template>
<script>
var fred = {"name": "fred"};
var tom = {"name": "tom"}
Polymer({
is: 'example-component',
properties: {
elements: {
type: Array,
value: [{"name": "Main1", "person": fred}, {"name": "Main2", "person": tom}, {"name": "Main3", "person": fred}],
notify: true
}
}
});
</script>
</dom-module>