質問

How do I check for if not condition in the Dust.js templates?

{?tags}
{:else}
  <p>Sorry, There are no tags!</p>
{/tags}
役に立ちましたか?

解決

This is built into Dust, using the ^ tag (often called the "not" tag):

{^tags}
  <p>Sorry, There are no tags!</p>
{/tags}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top