Using handlebars.js to enable language and data source/CMS agnostic interface for presentation tier to use
- Late binding of template to content
- Granular reusable partials
- Work in the browser, in Node, in Rails and in Java
In the browser-javascript
directory we have an example of Handlebars.js working in the browser with JavaScript
- Node.js
Install the Node and Bower dependencies:
npm install
bower install
And then run the nws webserver with
npm start
You can now navigate to http://localhost:3030/ to see the Browser/JavaScript version
Once the server is up you can run the Mocha/Chai tests here: http://localhost:3030/test.html
The example helper is adapted from this answer to this Stack Overflow Question
WIP.