I have created 2 handlebars files in 'Views' folder:
I want to add a link to contact.handlebars in index.handlebars.
I tried using 'a' tag:
<a href="views/contact.handlebars">Contact Page</a>
<a href="contact.handlebars">Contact Page</a>
<a href="contact.html">Contact Page</a>
but none of them is redirecting it to the contact.handlebars page.
Since the browser cannot interpret a handblebars
template, you need to link to the route
in your server from which contact.handlebars
is being rendered.
<a href='/contact'>Contact</a>
This is if your route on your server is at /contact
for the contact page
Your express server should be serving two routes
app.get('/', (req, res) => {
// render your index.handblars
})
app.get('/contact', (req, res) => {
// render your contact.handlebars
})