• This function renders an inline attribute when condition resolves to true.

    Example

    <div{{attribute ' style="display: block;"' visible}}></div>
    

    Parameters

    • attribute: string

      The attribute to be rendered

    • condition: any

      The value that is evaluated to determine whether to render attribute

    Returns Handlebars.SafeString

    attribute if condition resolves to true, otherwise an empty string