Skip to content

Instantly share code, notes, and snippets.

@DanielDornhardt
Last active October 5, 2023 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanielDornhardt/622d1bcfb916a04239790b1a20b149f4 to your computer and use it in GitHub Desktop.
Save DanielDornhardt/622d1bcfb916a04239790b1a20b149f4 to your computer and use it in GitHub Desktop.
Meteor Blaze asyncHelpers.html - helper templates for working with ASYNC values in Blaze Templates
<!--
Display potentially async data source results in the template. Unsafe Content / HTML will be escaped like with regular {{ someValue }} blaze syntax.
Use like this:
{{> await someValue}}
-->
<template name="await">{{#let value=.}}{{value}}{{/let}}</template>
<!--
Display potentially async data source results in the template. Unsafe Content / HTML will NOT be escaped, similar to using the triple bracket {{{ someValue }}} blaze syntax.
Use like this:
{{> awaitRaw someValue}}
-->
<template name="awaitRaw">{{#let value=.}}{{{value}}}{{/let}}</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment