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 trialNicholas Smay
14,768 PointsQuestion link not showing up
Does anyone see anything wrong with this code? My answer link is working, but I can't get the question link to appear once the answer is being displayed.
if (side === 'question') {
templateData.hint = hint;
templateData.sideToShow = 'answer';
templateData.sideToShowDisplay = 'Answer';
} else if (side === 'answer') {
templateData.sideToShow = 'question';
templateData.sideToShowDisplay = 'Question';
}
a(href=`${id}?side=${sideToShow}`)= sideToShowDisplay
1 Answer
Jun Hong Lin
4,641 PointsI modified my interpolation in card.pug like below and it works for me.
a(href= id + '?side=' + sideToShow ) #{sideToShowDisplay}
Seamus Sionóid
27,798 PointsSeamus Sionóid
27,798 PointsI had this issue. The solution was just to take my anchor link out of the hint if loop by indenting the anchor element once to the left.