Answer the question
In order to leave comments, you need to log in
How to properly create and export data array in node js?
Good afternoon, there is an application skeleton on express.js + EJS, page templates have been created that have elements that are different on each page.
Given via <%= locals.title %>
.
Each page has its own file for assigning all template variables. This file only
module.exports = {
title: 'Страница 1',
}
clients = {
data: [
{
logo: "im.svg",
title: "Client1",
clientId: 'id1'
}]
}
<%= include() %> или <%- partial() %>
, but how can they be transferred to the template via module.exports?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question