Jade indentation errors

前端 未结 3 1006
有刺的猬
有刺的猬 2021-01-31 23:25

So for my Express site, I\'m using jade. So I decided to try modifying my layout file so I can start designing my site. I modified the original layout code (which worked), but I

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 23:53

    for edit form on server.js file set variable like this

    var applications = row;
    res.render("edit", { applications : applications[0] }); 
    

    for edit.jade file :

    block content
    table
        thead
          tr
            th First Name
            th Last Name
        tbody
          - each item in applications
            tr
              td= item.username
              td= item.email
    

提交回复
热议问题