.insertTemplate - PeterNaydenov/code-assembly-line GitHub Wiki

Insert one or more templates into template engine.

tplEngine.insertTemplate ( templates )

  • templates: {}. Keys are template names. Values are templates;
  • Method return options:
    • tplEngine;
  • Method is chainable;

Example:

  const templates = {
                        'hello' : 'Hello {{user}}'    // template 'hello'
                      , 'bye'   : 'Good bye {{user}}' // template 'bye'
                    }

 tplEngine.insertTemplate ( templates )

Templates 'hello' and 'bye' are defined.