mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-22 14:58:12 +00:00
Rework todomvc history
This commit is contained in:
parent
c50f88caf0
commit
ec0b383ed3
@ -13,17 +13,16 @@
|
||||
|
||||
(enable-console-print!)
|
||||
|
||||
;; -- Routing -----------------------------------------------------------------
|
||||
;; -- Routes and History ------------------------------------------------------
|
||||
|
||||
(defroute "/" [] (dispatch [:set-showing :all]))
|
||||
(defroute "/:filter" [filter] (dispatch [:set-showing (keyword filter)]))
|
||||
|
||||
(def history (History.))
|
||||
|
||||
(events/listen history EventType.NAVIGATE
|
||||
(fn [e] (secretary/dispatch! (.-token e))))
|
||||
|
||||
(.setEnabled history true)
|
||||
(def history
|
||||
(doto (History.)
|
||||
(events/listen EventType.NAVIGATE
|
||||
(fn [event] (secretary/dispatch! (.-token event))))
|
||||
(.setEnabled true)))
|
||||
|
||||
|
||||
;; -- Entry Point -------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user