Created
January 15, 2014 04:39
-
-
Save anonymous/8430856 to your computer and use it in GitHub Desktop.
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 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)))))))) |
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
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