0

I'm trying to use EJS. I call response.render('agent.html', {name: 'aaaa'});, and in HTML script I try access <%= this.name %>, but I have an error log saying ReferenceError: aaaa is not defined. Can you help me guys? Ty

1 Answer 1

1

it looks like the html template is trying to access the aaa property on 'this' and it doesn't exist. Instead in your html try: <%= name %>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.