In app.js (the express server) these 2 lines run the Angular App:
app.use(express.static(__dirname + '/dist/tao-web'));
app.get('/', (req, res) => res.sendFile(path.join(__dirname)));
If you navigate directly to http://localhost:3000 and go from there the app will work fine. You will see the paths in the browser change as you navigate. But if you refresh the page at any point or navigate directly to a path like http://localhost:3000/dashboard the app will not work.
I assume this issue happens because there is no reference to these paths in the express.js server.
In app.js (the express server) these 2 lines run the Angular App:
app.use(express.static(__dirname + '/dist/tao-web'));
app.get('/', (req, res) => res.sendFile(path.join(__dirname)));
If you navigate directly to http://localhost:3000 and go from there the app will work fine. You will see the paths in the browser change as you navigate. But if you refresh the page at any point or navigate directly to a path like http://localhost:3000/dashboard the app will not work.
I assume this issue happens because there is no reference to these paths in the express.js server.