Created
January 1, 2016 20:56
-
-
Save drusellers/27cbd0c22217930fde27 to your computer and use it in GitHub Desktop.
Launching Om Apps
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
(defn main [] | |
;; conditionally start the app based on whether the | |
;; node is on the page | |
(if-let [node (.getElementById js/document "app-one")] | |
(om/root app-one app-one-state {:target node})) | |
(if-let [node (.getElementById js/document "app-two")] | |
(om/root app-two app-two-state {:target node})) | |
(if-let [node (.getElementById js/document "app-three")] | |
(om/root app-three app-three-state {:target node}))) | |
(main) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment