我正在使用流星。我有一个看起来像这样的模板,
<template name="SearchAct">
{{#each SearchPerson}}
<div class="result"><!--This is one search result box-->
<div class="resultContent">
<img src={{payload.pic_square}} alt="profile photo" class="floatLeft" />
<p>{{payload.uid}}</p>
<span class="floatLeft">
{{payload.first_name}}
<br/>
{{payload.last_name}}
</span>
<input type="checkbox" class="floatRight" />
<h4>Tennis</h4>
<span class="age_location">
{{#if payload.birthday}}
{{payload.birthday}},
{{/if}}
{{#if payload.sex}}
{{payload.sex}}
{{/if}}
<br/>
{{#if payload.hometown_location}}
{{payload.hometown_location.city}},
{{payload.hometown_location.state}},
{{payload.hometown_location.country}}
{{/if}}
</span>
<div class="line"></div>
<a href="#" class="clear" onclick="renderProfile({{payload.uid}});">See Their Details</a>
</div><!-- End of resultContent-->
</div><!-- End of result box-->
{{/each}}
</template>
现在我想检查{{payload.birthday}}
. 在这里,如果我得到null
价值,我想显示一条消息。我怎么能检查一个null
值?