A
A
Alexander Ivanov2015-05-13 12:06:06
Node.js
Alexander Ivanov, 2015-05-13 12:06:06

How to create a list with links to Jade?

I started to study jade, I try to create a list with a link by analogy:

ul
  each val, index in {1:'one',2:'two',3:'three'}
    li= index + ': ' + val

changed to:
ul
              each val, link in {'path.jade':'main','path.jade':'page_1','path.jade':'page_2'}
                li= link + ': ' + val
            ul

but the output is this: path.jade: page_2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Homsa Toft, 2015-05-13
@kostein

I am writing from my phone, there may be errors.
For example:

- var links = [{name:"Главная", url:""}, {name:"Производство, url: "build" {name:"Контакты", url:"contact"}]

ul
  each link in links
    li
      a(href="#{link.url}") #{link.name}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question