Saturday, 22 April 2017

Unable to route from one web page to other page in an application

I have been trying to route from one web page to other web pages with the help of nodejs express, HTML, and MongoDB. But unable to route the page. I a, following GitHub link to develop the application. I have analyzed the code using some references. I am providing the code.

GitHub & reference link: https://github.com/mschwarzmueller/nodejs-basics-tutorial/tree/master/09-mongodb

Code:

routing link
<ul class="topnav">
    <li><a href="./home.hbs">Home</a></li>
    <li><a class="active" href="#index">Registration</a></li>
    <li><a href="./event_schedule.hbs">Event Schedule</a></li>
    <li><a href="./event_guidelines.hbs">Event Guidelines</a></li>
    <li><a href="./contact_details.hbs">Contact Details</a></li>
</ul>

Routing link in index.js

router.get('/registration', function(req, res, next) {
  console.log("kumari1");
  res.render('event_schedule');
}); 

Kindly help me out of this



via youtube3

No comments:

Post a Comment