var template = Handlebars.compile(document.getElementById('template').innerHTML);
let newTemplate = template({name: 'Max', age: 38});
document.getElementById('output').innerHTML = Handlebars.compile(newTemplate)({name: 'Max', age: 38});
all {{}} will be replaced. But if there is a situation, that i just want {{name}} show on the page rather than Max.
How to do. I have tried a lot but can not find a way.
After
all {{}} will be replaced. But if there is a situation, that i just want
{{name}}
show on the page rather thanMax
. How to do. I have tried a lot but can not find a way.Please check: https://jsfiddle.net/ba8y9rwz/1/