I am passing parameter to HTML page with NodeJs router using:
res.render('dashboard', {ph_user: fname});
I can use this parameter in my HTML code with:
<div id="greeting">Welcome: <%= ph_user %></div>
However, i also would like to use this parameters with script on HTML page. I am sure I can extract if from element by ID, but that doesn't seem like the most efficient way. What is the best way, to access/use parameter in script on HTML page.
Any guidance is greatly appreciated.