Getting the url parameters in an ejs template
问题 I am trying to create an ejs conditional based on a URL parameter, for example, if the test parameter exists at localhost:3000/page?test, then show a div, else dont show it. My ejs template looks something like: <% include header %> <div class="row"> <%if (title !== "homepage") {%> <%= title %> <div> <% include nav %> </div> <%}%> <div> </div> </div> <% include footer %> Is there a way to access the URL parameters directly from the ejs file? For example, the <%= title %> works fine, is there