Skip to content

Instantly share code, notes, and snippets.

@drusellers
Created January 1, 2016 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drusellers/27cbd0c22217930fde27 to your computer and use it in GitHub Desktop.
Save drusellers/27cbd0c22217930fde27 to your computer and use it in GitHub Desktop.
Launching Om Apps
(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