Skip to content

Power to conditionals

Choose a tag to compare

@sroehrl sroehrl released this 27 Jan 14:50
· 15 commits to master since this release
014ea82

"n-if" now supports type-based evaluation.
You can now freely use

  • strings
  • booleans
  • numbers (float/double/int)
  • NULL

without escaping issues:

<p n-if="!booleanValue">works</p>
<p n-if="stringValue == 'test'">works</p>
<p n-if="numberValue > 2">works</p>

This enables more complex scenarios as before, making native PHP possible:

<p n-if="strpos(stringValue, 'te') !== false">works</p>