Answer the question
In order to leave comments, you need to log in
Pug. How to pass value to href?
Good afternoon. Help, please, to understand. In jade, this code worked, in pug it gives an incorrect result:
ul
- var menu = {'#courses' : 'Направление', '#trainers' : 'Тренеры'}
each value, key in menu
li
a(href="#{key}") #{value}
<ul>
<li><a href="#{key}">Направление</a></li>
<li><a href="#{key}">Тренеры</a></li>
</ul>
<ul>
<li><a href="#courses">Направление</a></li>
<li><a href="#trainers">Тренеры</a></li>
</ul>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question