Skip to content

Instantly share code, notes, and snippets.

Created January 15, 2014 04:39
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 anonymous/8430856 to your computer and use it in GitHub Desktop.
Save anonymous/8430856 to your computer and use it in GitHub Desktop.
(defn show []
(dom/replace-contents! (dom/sel1 "#app") login-view)
(let [on-submit (dom/listen! (dom/sel1 login-view ".login-submit") :click)]
(go
(loop []
(<! on-submit)
(let [login-info @context
login-name (:name login-info)
login-password (:password login-info)
login-status (or
(if (-> login-info empty? not) nil "Morate unijeti korisničko ime")
(if (-> login-password empty? not) nil "Morate unijeti lozinku"))]
(when login-status
(swap! context assoc :error login-status)
(recur))
(try
(reset! context (<!remote auth.account/login login-name login-password))
(catch js/Object e
(swap! context assoc :error (pr-str e))
(recur))))))))
clojure.lang.ExceptionInfo: No implementation of method: :emit-instruction of protocol: #'cljs.core.async.impl.ioc-macros/IEmittableInstruction found for class: cljs.core.async.impl.ioc_macros.Jmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment