template is used to replace data by name in template strings. The default expression looks for {{name}} to identify names.
Ex. template('Hello, {{name}}', { name: 'ray' })Ex. template('Hello, <name>', { name: 'ray' }, /<(.+?)>/g) Copy
Ex. template('Hello, {{name}}', { name: 'ray' })Ex. template('Hello, <name>', { name: 'ray' }, /<(.+?)>/g)
Description
template is used to replace data by name in template strings. The default expression looks for {{name}} to identify names.
Example