Wednesday 29 January 2020

Is it possible to use EJS variables in EJS includes?

I recently started with ejs and I'm trying to make a sort of dynamic include, Id like to change the url of the template to include based on a variable.Something like:<% toLoad:"user" %>and then:<%- include('../partials/details-<% toLoad %>'); -%>I tried but I get Could not find matching close tag for "

No comments:

Post a Comment