My project.clj
has,
:cljsbuild {:builds
{:app
{:source-paths ["src/cljs" "src/cljc"]
:compiler {:output-to "target/cljsbuild/public/js/app.js"
:output-dir "target/cljsbuild/public/js/out"
:main "my.core"
:asset-path "/js/out"
:optimizations :none
:source-map true
:pretty-print true}}}}
and I include app.js
in my list.html
, using Selmer, like so,
{% block page-scripts %}
{% script "/js/app.js" %}
{% endblock %}
at the end of my list.cljs
, I have
(r/render [list] (.getElementById js/document "content"))
so far so good.
Now, I would like to have another page, say detail.cljs
, that I also like to render similarly,
(r/render [detail] (.getElementById js/document "content"))
The problem is, I just have a single app.js
and including that in detail.html
will render list content there too. Btw, I want one url for list
page, and another for detail
.
Question:
How should I go about it?