Closed virajchitnis closed 7 years ago
Also, try to avoid generating a separate HTML file for each page. Try to use the same file, but change the page title using some node.js middleware/code.
Don't forget to update the page title to match the current page. document.title = 'blah blah';
Output the HTML as pug/jade and then render via expressJS. That will allow me to use the same HTML file for all pages. Have the ExpressJS template engine set the title of the page.
Change all menu bar hrefs to click methods. When clicked, they will each trigger an event. The App will be listening to these events, and when it hears it, it will switch the dom to the appropriate page and update the pathname to correspond. Server side will remain as it is.