Wouter, in regards to that sequence of events, I would reduce sequence to the following question: What does my elm app do when the address bar is "/apples/234" ? If apple 234 exists, show the apple page. If apple 234 does not exist, show a "Not Found" page.
IMHO if the user types the url "/apples/234" into the address bar, then I must consider that url to be correct, and it is the job of my elm application to respond to that url - even if only to show a NotFound page/message. With that said, it would also be fairly trivial to, rather than displaying a NotFound page, redirect the user to "/apples" if the user is trying to visit the url of an apple that doesn't exist i.e "/apples/234". You can easily do that using Option 1. On Saturday, November 26, 2016 at 7:44:20 AM UTC-5, Wouter In t Velt wrote: > > Thank you for the explanation Erik! With the upgrade to 0.18 and the > changes in navigation, I was wondering which route (pun intended) to follow > with the upgrade. Not sure I follow completely though. > > In option 1, could you deal with redirect-like scenario's inside the SPA? > Like > > 1. user is on the "/apples" page, showing all available apples. > 2. user types "/apples/234" in the url-bar > 3. there happens to be no such apple > 4. I want the user to stay on the "/apples" page, and get a message > like "this apple is forbidden fruit" > 5. at this point, I would want the url-bar to also say "/apples" > > Can this work with option 1? Or is this only possible with option 2? > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
