I am using EJS as my Express view engine, and I'm trying to 'expose' a variable in a partial so that I can use it in the *.ejs which 'include' it, but I don't know how to do it.
partial.ejs
<% var jsUrl = 'sth'; %>
test.ejs
<script tpye="text/javascript" src="<%= jsUrl %>"></script>
When I render test.ejs, I want to pass nothing to test.ejs.like:
res.render('test.ejs');
Instead, I want to use the variable which defined in the partial. Any help is appreciated.