props

You can use this object to obtain custom parameters passed during the template invocation. This is only available when rendering a block or component.

Block Example:

Assuming the following parameters are passed when rendering a block:

{{#block foo="bar" count=1 /}}

You can access these parameters within the block in the following way:

{{ props.foo }} {{ props.count }}

Component Example:

Assuming the following parameters are passed when rendering a component:

{{#component "demo" foo="bar" count=1 /}}

You can access these parameters within the component in the following way:

{{ props.foo }} {{ props.count }}
Was this article helpful to you?