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