Description
Hi, I'm aware the bind
attribute has been disabled on <template>
s but after pouring through the docs on polymer-project.org, stackoverflow.com and the polymer source code I'm not sure how to port the same functionality to Polymer 1.0. As I understand it the bind
attribute allows you to scope to properties inside of a template.
So with this code snippet I would expect name
to become "test" (if bind was ported from Polymer 0.5), but I'm not sure how to apply this scoping in Polymer 1.0. I know I could just do {{data.name}}
but unfortunately my use case is a bit more complex and that won't work. Could you please advise on how to achieve this? My element is supposed to be a file treeview, which either requires an indefinite number of dom-repeat
s or scoping like this.
<dom-module is="example-elem">
<template>
<template bind="{{data}}">
<div>{{name}}</div>
</template>
</template>
</dom-module>
<script>
Polymer({
is: 'example-elem',
properties: {
data: {
type: Object,
value: {
name: "test"
}
}
}
}
</script>