Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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 ! :)