Edited: I thought this is a pug problem, but not.
Here is the code
- var list = [1, 2, 3, 4, 5]
.navbar.clearfix
a.logo(href="#") Logo
div.links
each i in list
a(href="#")= 'Link ' + i
.sub-menu
each i in list
a(href="#")= 'Link ' + i
The problems are the .sub-menu is not in the a element, and there is an extra blank 'a' in .sub-menu.
Is it possible to create a multi level iteration in pug? Thanks