How can I create simple view engine like Mustache, so that the word between the {{ }} is replaced by its value, like:
<p>hey there {{ codeName }}</p>
codeName = 'JavaScript 6'
so that it be converted to:
<p>hey there JavaScript 6</p>
How can I create simple view engine like Mustache, so that the word between the {{ }} is replaced by its value, like:
<p>hey there {{ codeName }}</p>
codeName = 'JavaScript 6'
so that it be converted to:
<p>hey there JavaScript 6</p>
I found the below to be proper way to understand it:
reference is here