.getPlaceholders - PeterNaydenov/code-assembly-line GitHub Wiki
Return placeholders per template.
tplEngine.getPlaceholders ( templateName )
- templateName: string. Template name;
- Method return options:
- placeholderNames: string[]. List with names of the placeholders;
- Method is not chainable;
Example:
const templates = {
'age' : '{{user}} is {{age}} years old.' // template 'age'
}
tplEngine.insertTemplate ( templates )
// Now templates are available in template engine
tplEngine.getPlaceholders ( 'age' )
// -> [ 'user', 'age' ]