Using Express with Don Park HBS as a viewer with the intention of using the same template template for client and server code. However, I ran into some problem.
With index.hbs shown here,
<h1>{{title}}</h1> <p>Welcome to {{title}}</p> <div id="place"></div> <script id="firstTemplate" type="text/x-handlebars-template"> <ul> {{#lines}} <li>{{name}}</li> {{/lines}} </ul> </script>
Here's what the browser does:
<h1>Express</h1> <p>Welcome to Express</p> <div id="place"></div> <script id="firstTemplate" type="text/x-handlebars-template"> <ul> </ul> </script>
The rendering process of Express View seems to have used a block of templates designed for use in a browser. As far as I can tell, the rendering view just takes the whole .hbs file as a tempate template for rendering without extracting the script block from the server view.
Any ideas / workarounds for this?
source share