Json line break

1

I'm trying to develop a system with Node.js and I'm trying to list the database's data in my table, but the data gets all together like this:

IstilldonotunderstandmuchaboutJson,isitbecausehe'sthatway?

This is my role listing:

 Usuario.find(function (err, data) {
                if(err){
                    console.log(err);
                }

                res.render("usuarios/index", {lista: data});
            });

And this is my page:

extends ../layout

block content
        h1 Página de Usuários
        br
        br
        a(href="/" title="Home") Voltar
        br
        br
        table(class="table well")
            thead
            tr
            th ID:
            th Nome:
            th Login:
            th Senha:
            th Data:

        tbody
            each valor, i in lista
                tr
                    td #{valor.id}
                    td #{valor.nome}

CMD:

    
asked by anonymous 03.07.2015 / 18:36

1 answer

1

It is necessary to indent the th associated with tr (in this case, thead ), otherwise Jade will interpret as all being at the same level as thead .

table(class="table well")
    thead
        tr
            th ID:
            th Nome:
            th Login:
            th Senha:
            th Data:
    
03.07.2015 / 19:17