Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Build a Simple Dynamic Site with Node.js Creating a Basic Template Engine in Node.js Binding Values

Kjetil-Lennart A. Lorentzen
Kjetil-Lennart A. Lorentzen
13,390 Points

{{}} not turning into values, previous solutions not working

Here's the snapshot of my workspace

https://w.trhou.se/qwcqak4wdv

I did it locally, and uploaded this for help.

{{}} not turning into the values from the object. I checked the replace(), it hasn't got spaces, i checked the object, it looks fine, and all the names in profile.html match up with the keys.

I'm in dire need of help on this one

2 Answers

Kjetil-Lennart A. Lorentzen
Kjetil-Lennart A. Lorentzen
13,390 Points

I figured it out. i had "values" in {}.

problem:

      //simple response
      renderer.view("profile", {values}, response); // <-- there is the problem.
      response.end("footer", {}, response);
      response.end();
    });

problem solved:

      //simple response
      renderer.view("profile", values, response); 
      response.end("footer", {}, response);
      response.end();
    });

Just leaving my question up in case somebody else runs into the same thing

Thanks for posting your solution :)

thanks for leaving it up you the best

Thank-You ! :)