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 Express Basics Parameters, Query Strings, and Modularizing Routes Randomize Cards

Bobby Brice
seal-mask
.a{fill-rule:evenodd;}techdegree
Bobby Brice
Full Stack JavaScript Techdegree Student 10,909 Points

anchor tag is displaying, '=sideToShowDisplay' rather than Question and Answer

My app is working as expected with the card flipping between the Q&A but the text displayed is showing =sideToShowDisplay rather than the appropriate 'Question' and 'Answer' text.

My code matches the video and after changing the href in card.pug a few different ways, I can't seem to get it working.

a(href=${id}?side=${sideToShow}) = sideToShowDisplay

Sean King
Sean King
5,144 Points

Hi Bobby. Since this is a late reply, I hope you found your answer by now. Your code

a(href=${id}?side=${sideToShow}) = sideToShowDisplay

has a space between the anchor tag and the equals sign. Pug interprets this as a text string. Removing the space will fix it :)

1 Answer

I don't know if it's just me but every time I view a new video const templateData keeps changing with no explanation?

const templateData = { id, text };