Fork me on GitHub
#reagent
<
2018-08-25
>
Mau13:08:01

Hi I am trying to have a home page "/" that has different css and js than the rest of my reagent app. In handler.clj I've defined different [:head] sections for different routes. But it seems the first route I take, it will use that particular definition of the [:head] and thus its js and css, thoughout the app.

(defroutes routes
  (GET "/" [] (home-page))
  (GET "/admin" [] (admin-page))
  (GET "/apply" [] (applicant-page))
  (GET "/login" [] (applicant-page))

Mau13:08:28

So guess compojure takes care of this

Mau13:08:20

On clientside I use Secretary.. So I guess this is the reason why the [:head] stays the same once you have entered the starting URL

Mau14:08:32

Is there a way to load different JS and CSS using Secretary (or something else) (client side ?)