Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @tmorin/ceb-templating-literal

Index

Functions

Functions

html

  • html(strings: TemplateStringsArray, ...args: any[]): Template<UpdateParameters>
  • This function is a tag function which converts a literal statement to a Template. The template can then be used to update the DOM.

    example

    Render a simple greeting

    import {Template} from "@tmorin/ceb-templating-builder"
    import {html} from "@tmorin/ceb-templating-literal"
    const name = "World"
    const template : Template = html`<p>Hello, ${name}!</p>`
    template.render(document.body)

    Parameters

    • strings: TemplateStringsArray

      the strings

    • Rest ...args: any[]

      the arguments

    Returns Template<UpdateParameters>

Generated using TypeDoc