Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partial can't use the path which in express sets #27

Open
Nicolaschinc opened this issue Mar 6, 2017 · 0 comments
Open

partial can't use the path which in express sets #27

Nicolaschinc opened this issue Mar 6, 2017 · 0 comments

Comments

@Nicolaschinc
Copy link

Like that:

/app.js/

var app = express();
var express = require('express');
var ejsMate = require('ejs-mate');
var path = require('path');

app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');
app.engine('ejs',ejsMate);

we set the static path at views

catalogue:

|---views
| |---src
| | |---list.ejs
| | |---main.ejs
| |---layout
| | |---layout.ejs
/main.ejs*/

<% layout('/layout/layout') %>
<%- partial('/src/list',{name:"abc"}) %>

layout true but partial is wrong which consoles that could not find the path

why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant