我的
在我的
问题是,我只有一个名为
问题是如何处理?
project.clj
文件中,包含以下内容: :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}}}}
我在 list.html
中使用 Selmer,并包含了 app.js
。代码如下:
{% block page-scripts %}
{% script "/js/app.js" %}
{% endblock %}
在我的
list.cljs
文件的末尾,我有以下内容:(r/render [list] (.getElementById js/document "content"))
到目前为止一切都很顺利。
现在,我想要另一个页面,例如detail.cljs
,我也希望以类似的方式呈现它。
(r/render [detail] (.getElementById js/document "content"))
问题是,我只有一个名为
app.js
的文件,将其包含在detail.html
中也会在那里呈现列表内容。顺便说一下,我想要一个网址用于list
页面,另一个网址用于detail
页面。问题是如何处理?