Show:

Q.Handlebars Class

Creates a Q.Handlebars object

Item Index

Methods

render

(
  • template
  • data
  • partials
)
String | Null

Render handlebars template

Parameters:

  • template String

    The template name

  • data Object

    Optional. The data to render

  • partials Array

    Optional. The names of partials to load and use for rendering.

Returns:

String | Null:

render

(
  • content
  • data
  • partials
)
String | Null

Render handlebars literal source string

Parameters:

  • content String

    The source content

  • data Object

    Optional. The data to render

  • partials Array

    Optional. The names of partials to load and use for rendering.

Returns:

String | Null:

template

(
  • path
)
String | Null

Load and return the content of a handlebars template (synchronously)

Parameters:

  • path String

    The template name

Returns:

String | Null:

The content of the template, or null if it wasn't found