Created
August 5, 2011 00:46
-
-
Save fmw/1126686 to your computer and use it in GitHub Desktop.
vix routes function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def h (atom nil)) | |
(defn routes [uri-path] | |
(compare-and-set! h nil (new goog.history.Html5History)) | |
(cond | |
(re-matches #"^/admin/[^/]+/new$" uri-path) (editor/start :new uri-path) | |
(re-matches #"^/admin/[^/]+/edit.+" uri-path) (editor/start :edit uri-path) | |
(re-matches #"^/admin/[^/]+/overview$" uri-path) (feed/list-documents uri-path))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment