Do I have to save current URL into model if I want to use Nav.pushUrl?

I’m making an SPA using Elm, and I need to navigate to another route after received a message.

The problem is that if I use:

Nav.replaceUrl key <| Builder.absolute [ "/another" ] []

The browser gives A history state object with URL 'http://another' cannot be created in a document with origin XXX .

Is there a method to directly issue an internal navigation without knowing current domain ?

1 Like

I found that removing / from the /another thus using [ "another" ] results to correct behavior, thanks.

4 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.