Closed erfurtjohn closed 4 years ago
If you are loading jsrender in the browser, then since the javascript in the browser does not have access to the file system, you can't load template files from the client. But you can access template files on the server, using $.get or $.getScript, as shown here: https://www.jsviews.com/#compiletmpl@fromserver
If you are running jsrender on the server, (Node.js) then yes. See https://www.jsviews.com/#node/filetmpls and also https://github.com/BorisMoore/jsrender-node-starter.
Thank you for the advice!
Is it possible to put the template content into an external file like templates/table.tpl or something similiar?