如何检查Dust.js模板中是否有条件?
{?tags}
{:else}
<p>Sorry, There are no tags!</p>
{/tags}
Run Code Online (Sandbox Code Playgroud)
这是使用^标记(通常称为"非"标记)构建到Dust中的:
{^tags}
<p>Sorry, There are no tags!</p>
{/tags}
Run Code Online (Sandbox Code Playgroud)