I am trying to use Handlebars on Nodejs.
I can execute plain vars but what if I want to execute javascript code to output some values? In PHP we would do this :
<div>This is formatted date : <?php echo date($oldDate); ?> </div>
Example in nodejs handlebars:
<div>This is non formatted date: {{olddate}}</div>
<div>This is formatted date : {{ date(olddate)}}</div>
I know that in EJS template engine we can do this by putting inside <% like this
<div>This is formatted date : <% date(olddate)%></div>
Thank you for your answers