0
我正在显示从JSON文件中提取的数据,其中一个JSON属性可能有或没有值。我只想在JSON文件中的值存在时才显示文本。我试过以下,但没有显示。聚合物中数据项的有条件显示
<template is="dom-repeat" items="[[session]]" as="subSession">
.... Display other values from the JSON file
<template is="dom-if" if="{{subSession.track.presentation}}">
<div class="session-meta layout horizontal">
<iron-icon class="session-meta-icon" icon="class"></iron-icon>
<span>Presentation Available</span>
</div>
</template>
谢谢,你发现project_check脚本是必要的吗?我能够解决这个问题,只使用dom-if语句。 – tw1742