You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to...
I am trying to use Render() with EJS.
The problem:
First off I want to thank you for this library, it really awesome and have really enjoyed using it.
I have a new project I am working on and decided that EJS would be best for it. I am using the Render decorator and the first call it works perfectly but any subsequent calls that use a different template will get the first template returned.
For example, if I request /puppies it will return the template from puppies.ejs. If I then request /kittens, debug shows the template file for puppies still being returned.
I am using the koa-ejs module with this, but have tested with koa-views and get the same result.
<!-- layout.ejs -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>EJS Test</title>
</head>
<body>
<%- body %>
</body>
</html>
<!-- puppies.ejs -->
This is the puppies page.
<!-- kittens.ejs -->
This is the kittens page.
I am a network engineer by day, learning app development by night so if my code doesn't look good feel free to point it out.
Thank you very much for your time and any help you may be able to provide.
The text was updated successfully, but these errors were encountered:
I was trying to...
I am trying to use Render() with EJS.
The problem:
First off I want to thank you for this library, it really awesome and have really enjoyed using it.
I have a new project I am working on and decided that EJS would be best for it. I am using the Render decorator and the first call it works perfectly but any subsequent calls that use a different template will get the first template returned.
For example, if I request
/puppies
it will return the template from puppies.ejs. If I then request/kittens
, debug shows the template file for puppies still being returned.I am using the koa-ejs module with this, but have tested with koa-views and get the same result.
Here are my files:
Templates:
I am a network engineer by day, learning app development by night so if my code doesn't look good feel free to point it out.
Thank you very much for your time and any help you may be able to provide.
The text was updated successfully, but these errors were encountered: