Sunday 28 May 2017

Express node ejs link issues

I am trying to make a button go to another page which I felt like I knew what I was doing but obviously I am over looking something here.

registered.ejs

// Registered route

app.get('/registered', (req, res) => {
    Client.find({}, (err, clients) => {
        if (err) {
            console.log(err);
        } else {
            res.render('registered', {
                title: 'Migrant Med | Registry',
                header: 'Registered Clients',
                clients: clients
            });
        }
    });
});

server.js

// Registered route

app.get('/registered', (req, res) => {
    Client.find({}, (err, clients) => {
        if (err) {
            console.log(err);
        } else {
            res.render('registered', {
                title: 'Migrant Med | Registry',
                header: 'Registered Clients',
                clients: clients
            });
        }
    });
});

Am I missing something in the linking of the path? Or in the href itself I have tried so many combinations



via Perry Craft

No comments:

Post a Comment