How to share a mustache template between Scalate and Javascript?

384 views Asked by At

So I'm using some server-side mustache templates with Scalatra and Scalate, and I'd like to use them in my Javascript code too.

Ideally I can load the same templates via some sort of ajax call, but I'm not really sure how to set that up with Scalatra + jetty.

Currently the templates live in

src/main/webapp/WEB-INF/templates/views/

This is the default for Scalatra, but those files aren't served statically by jetty, so I'm unsure how to share them with the front end.

Any suggestions?

0

There are 0 answers