Reputation: 1155
I have created a polymer element which has a nested template. I want to access properties of parent template in the child template.
<dom-module id="gallery-content">
<template>
<template is="dom-bind">
<iron-ajax url="/getData" last-response={{data}} auto></iron-ajax>
<table id="table-stencils">
<tr>
<td>
<p>{{contentType}}</p>
<hr>
</td>
</tr>
<tr>
<td>
<image-block description={{data.description}}
lastmodified={{data.lastModified}}
imagepath="../../images/11.jpg"></image-block>
</td>
<td>
<image-block description={{data.description}}
lastmodified={{data.lastModified}}
imagepath="../../images/12.jpg"></image-block>
</td>
<td>
<image-block description={{data.description}}
lastmodified={{data.lastModified}}
imagepath="../../images/13.jpg"></image-block>
</td>
<td>
<image-block description={{data.description}}
lastmodified={{data.lastModified}}
imagepath="../../images/14.jpg"></image-block>
</td>
</tr>
</table>
</template>
</template>
<script>
Polymer({
is: "gallery-content",
properties:{
contentType: {
type:String,
value:"Others"
}
}
});
</script>
I am not able to access contentType
property of the parent element.
I am using another polyment() inside this gallery-content element.
Upvotes: 0
Views: 784