• Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data properties may be accessed as free variables in the template. If a setting object is provided it takes precedence over _.templateSettings values.

    Note: In the development build _.template utilizes sourceURLs for easier debugging.

    For more information on precompiling templates see lodash's custom builds documentation.

    For more information on Chrome extension sandboxes see Chrome's extensions documentation.

    Parameters

    • Optionalstring: string

      The template string.

    • Optionaloptions: TemplateOptions

      The options object.

    Returns TemplateExecutor

    Returns the compiled template function.