I have this ejs template:
<h1 id="city-name"><%= title %></h1>
<h5 id="weather-description"><%= description %></h5><br>
<i class="bi bi-thermometer-half"></i><p id="temperature"><=% temperature %></p><br>
<i class="bi bi-wind"></i><p id="wind"><=% wind %></p><br>
<i class="bi bi-moisture"></i><p id="humidity"><=% humidity %></p>
and this is my js:
jsonObj = res.data;
desc = jsonObj.weather[0].description;
temp = JSON.stringify(jsonObj.main.temp);
wind = JSON.stringify(jsonObj.wind.speed);
hum = JSON.stringify(jsonObj.main.humidity);
console.log(wind);
console.log(temp);
console.log(hum);
response.render('city_template.ejs', {title : nameCapitalised, description : desc, temperature : temp, wind : wind, humidity : hum});
but in the template it shows only the title and the description, not the other variables, in console it shows wind, temp and hum, what's wrong?
Some of your tags are incorrect.
For example, <=% temperature %> should be <%= temperature %>