Hello all,

What are the best ways to achieve routing on the client side for app state, but 
use luminus/compojure for data?

For instance, let's say there's an app like this,

For luminus,

(GET "/api/data" ..)
(POST "/api/data" ..)
(GET "/api/user/:id ..)
(GET "/" (render-one-page-app-template))

And now, I'd like client side routing using secretary to handle

(defroutes in secretary)

/homepage (Pull data from /api/data, using Om/channels/nativestore/cursors)
/user/:id (Pull data from /api/user/:id)

I tried putting in a global route like "/*" (render-single-page-app) into 
Luminus, but somehow, my (Defroutes) are never obeyed. 



Code:

routes.clj
 (GET "/*" [] (render-one-page-app))


core.cljs

(om/root ... )

(defroute "/add" [] (js/console.log "Adding"))
(defroute "/browse" [] (js/console.log "Browsing"))
 

Thanks!
Viksit

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to