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

    Example

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

    Returns

    attribute if condition resolves to true, otherwise an empty string

    Parameters

    • attribute: string

      The attribute to be rendered

    • condition: any

      The value that is evaluated to determine whether to render attribute

    Returns Handlebars.SafeString