Interested in sponsoring this lovely little spot?

wrap Modifier

Wraps a string with a given HTML tag. Has the nice benefit of returning null if there is no data, eliminating the need for simple {{ if }} wrappers.

title: As the World Turns
{{ title | wrap:h1 }}
<h1>As the World Turns</h1>

You may also use Emmet-style CSS classes to be added to the tag.

{{ title | }}
<h1 class="fast furious">As the World Turns</h1>
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →