I have an express application that uses handlebars as view template engine.
I have a page that is written as a handlebars template. The problem is that part of this page must be rendered by the server, and other parts must be rendered on the client.
<body>
<div>my page with handlebars {{me}}</div>
<script id="each-template" type="text/x-handlebars-template" src="/partials/model1.js">
sample template {{friend}}
</script>
</body>
The problem is that the page gets to the client fully rendered (including the template within ).
<body>
<div>my page with handlebars Patricio</div>
<script id="each-template" type="text/x-handlebars-template" src="/partials/model1.js">
sample template
</script>
</body>
But it should be:
<body>
<div>my page with handlebars Patricio</div>
<script id="each-template" type="text/x-handlebars-template" src="/partials/model1.js">
sample template {{friend}}
</script>
How can get this result?