We are building a web page with hashtag navigation. There is lots of data, which comes in as JSON and we use client-side templates (jQuery) to render it. So what are the options for reusable templates on both client-side and server-side (Ruby on rails)? Because we would like to have an option to fallback to a non-hashtag url and in this case server should render the data.
I've seen Mustache.js, but it has poor support for iterating (can't get index) or nested templates and haml-js is not an option because it uses custom tags for loops.
There are also couple of workarounds with using javascript engine on server side, but I'm not sure this will be a good decision.
Any suggetions? Thanks.