0
Suppose I have the following page made in HTML that shows the name {{name}} and data {{ date}} both information came from the server:
<h1>Seu nome é {{name}} </h1>
<h1> A data de hoje é {{date}}</h1>
However, how would I do if hypothetically I want to pass the amount contained in {{date}} for the following function (script) added to the submitted html (?):
<script>
function mostradata (date) {
alert(date)
}
</script>
In short: I want my displayed function to receive the parameter {{date}} that came from the server.
I suggest you take a look at the Jade template engine. And you already have an answer here as well. https://answall.com/questions/198999/passar-variável-para-página-html-com-nodejs
– user181003
pq does not create a variable with the value of
{{date}}
and then use?– Ricardo Pontual