My SPA starts with something like http://localhost:3000/dist/dev which is mangement by the MainComponent. From there i can navigate to other components by clicking on buttons with routerLinks. So looking up a list of orders would show the childroute http://localhost:3000/dist/dev/orders <http://localhost:3000/dist/dev/orders/42> which leads to loading the OrdersComponent. Furthermore clicking an order leads to the next childroute http://localhost:3000/dist/dev/orders/42 which shows the orders and the details of order 42. <http://localhost:3000/dist/dev/orders/42>
Now the problem: If I reload the page with the url http://localhost:3000/dist/dev/orders/42 everything is fine and the order list + the order detail is shown. But If I reload http://localhost:3000/dist/dev/orders <http://localhost:3000/dist/dev/orders/42> the router doesn't recognize the path and will only show the page, that would be shown if only http://localhost:3000/dist/dev <http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A3000%2Fdist%2Fdev&sa=D&sntz=1&usg=AFQjCNEZTjfoOC0JjOziia66ILRz5DU44Q> was in the url, thus only loading the MainComponent and not the expected OrdersComponent. Any idea how to fix this? Btw. I already fixed the "Cannot GET ..." error with redirecting all requests to the index.html: server.get('*', function(req, res, next) { res.sendFile(process.cwd() + APP_BASE + APP_DEST + '/index.html'); }); -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
