Fork me on GitHub
#beginners
<
2017-04-06
>
sb10:04:09

(context "/activity" []
    (GET "/" [] (activity/index-page2))
    (GET "/hourly" [] (activitytwo/index-page2))
    (GET "/daily" [] (activitythree/index-page2))
    (GET "/benchmark" [] (activityfour/index-page2)))

sb10:04:50

Compojure nesting routes. If I try to load the activity/daily report, the bootstrap template (hiccup) lost the css/ js things.. how can I fix it?

sb10:04:30

with (GET "/activity-hourly" [] ... works every fine, without nested routes.

noisesmith17:04:18

that entirely depends on what activetythree/index-page2 returns - perhaps you want to use a common template inside all your handlers to ensure the right js/css is always present?

noisesmith17:04:28

the router doesn't control this at all

sb20:04:57

@noisesmith ok, therefore… thanks the answer. (yes all js/css present normally in the template, if I change the routes.. then lost..)

sb20:04:05

I will check it… how to fix. Now I dropped everything, one level up and solved. But not so ideal solution..