Function fromRemoteMustacheTemplate

  • Load a remote Mustache template and render it into a container

    Type Parameters

    Parameters

    • url: string

      Remote Mustache template URL

    • Optionaloptions: {
          helpers?: object;
      }
      • Optionalhelpers?: object

    Returns ((container: HTMLElement, state: State) => PromiseLike<void>)

    Render function

      • (container, state): PromiseLike<void>
      • Parameters

        • container: HTMLElement
        • state: State

        Returns PromiseLike<void>

    import { fromRemoteMustacheTemplate } from "@nosto/autocomplete/mustache";

    const render = fromRemoteMustacheTemplate("https://example.com/template.mustache");