Hello,
I would love to integrate the [vpusher/paper-tree]
(https://github.com/vpusher/paper-tree) as a custom component. Paper-Tree accepts a data property with the hierarchical tree information inside.
The tree data could look like this:
<paper-tree data='{
"name": "Media Center",
"icon": "weekend",
"open": true,
"children": [{
"name": "Movies",
"icon": "av:movie",
"children": [{
"name": "Interstellar",
"icon": "theaters"
}, {
"name": "The Godfather",
"icon": "theaters"
}, {
"name": "Pulp Fiction",
"icon": "theaters"
}]
}, {
"name": "TV Shows",
"icon": "notification:live-tv",
"children": [{
"name": "Breaking Bad",
"icon": "theaters"
}, {
"name": "Game of Thrones",
"icon": "theaters"
}]
}]}'
actions='[{
"label": "Play",
"event": "play"
}]'>
</paper-tree>
And the property definition in the template:
How do I need to setup the create the backing PaperTree class in order to create the tree programmatically on the server ?
How do I pass an array or an object to the javascript properties of the Polymer Template ?
I was able to integrate the paper-slider as shown in the tutorial. But this only needs basic types like int or string.
Bye, Torsten…