-
-
Save kurogelee/b58f396892f0af54a483 to your computer and use it in GitHub Desktop.
ClojureのオブジェクトをClojureScriptに変換する ref: http://qiita.com/kurogelee/items/9bff219edd55b35ce1af
This file contains hidden or 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
(ns sample | |
(:require [selmer.filters :as f])) | |
(f/add-filter! :cljs (fn [x] [:safe (pr-str (pr-str x))])) |
This file contains hidden or 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
(ns sample | |
(:require [cljs.reader :as r])) | |
(r/read-string js/value) |
This file contains hidden or 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
<script type="text/javascript"> | |
var value = {{value|cljs}}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment