, : columns. properties
:
Polymer({
is: 'my-table',
properties: {
items: Array,
columns: {
type: Array,
value: function(){return [];}
}
},
ready: function() {
this.columns = Polymer.dom(this).querySelectorAll('my-column');
this.items = [
{id: 1, name: 'John'},
{id: 2, name: 'Jane'},
];
},
});
<template> <template is="dom-bind">, . , .
http-, ?. , , hrefs, ../polymer/polymer.html. , Polymer (, polyserve web-component-tester), bower_components , ../. http- -, ? - (, apache ngnix), , URL- , .
jsbin
<my-table>
<my-column header="Id"><template>{{item.id}}</template></my-column>
<my-column header="Name"><template>{{item.name}}</template></my-column>
</my-table>
<my-table> <content>, , . , - , <my-table> .