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,056 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 };