ejs icon indicating copy to clipboard operation
ejs copied to clipboard

ReferenceError: EJS is not defined

Open mKontakis opened this issue 7 years ago • 2 comments

I am trying to update an element on the ejs file.

I try to do it like this:

var ejsFile= new EJS({url: 'views/profile.ejs'}).update('divResults', response);

on top of the file i have this

var ejs = require('ejs');

although i get ReferenceError: EJS is not defined. Any ideas?

mKontakis avatar Sep 30 '16 11:09 mKontakis

You are probably looking at docs for the wrong EJS. (There are multiple projects.) In addition, this EJS project is no longer active. The current version of EJS lives here: github.com/mde/ejs Doc site is here: http://ejs.co/

mde avatar Sep 30 '16 13:09 mde

As i can see there is no update method anymore, do you kno how i can update the template?

mKontakis avatar Sep 30 '16 14:09 mKontakis