Fork me on GitHub
#reitit
<
2019-07-20
>
Justin Duncan00:07:22

Heylo all, would anyone have advice on how to have to url for frontend routing display like this instead of the default when clicking <a> tags the page is refreshed unless I include the #

Justin Duncan01:07:24

Interim fix I added this line in the middleware (.replaceState (.-history js/window) (.now js/Date) "title" uri)

valtteri05:07:51

@justin909 you need to do two things, Set :use-fragment false when you start the router

(rfe/start!
   routes
   on-navigate
   {:use-fragment false})
Also you have to configure your backend server to return index.html for routes like . Here's an example how to do it for all routes https://github.com/metosin/reitit/blob/master/examples/frontend/src/backend/server.clj

4
y.khmelevskii12:07:58

@U055NJ5CC works great, thank you!

ikitommi11:07:00

e.g. :name, :json-schema/title and :swagger/title are used to get the name. Last one wins.