Questions tagged [client-side-templating]
101 questions
0
votes
1 answer
Using data in a handlebars helper
I'm trying to write a Handlebars helper that lets me display an element x number of times, where x is defined in the data passed to the template.
I'm adapting the code I found here for #times. But instead of it running a constant number of times for…

Brad Dwyer
- 6,305
- 8
- 48
- 68
0
votes
1 answer
best method to build table headings and data separately using same json in underscore.js?
I'm working on my first site using client-side templating, and so far so good. I'm just looking to achieve the best performance for the code below.
I'm given json in this format:
[
{
"slidenumber": "slide0",
"title": "Sample Data…

Kingsley
- 977
- 2
- 11
- 27
0
votes
1 answer
How to use a javascript function inside a dust.js template?
I'm using dust.js to do a client side templating. I would like to use a javascript function in my template, the function would get it's argument during templating i.e
Ex:
mytemplate = " Hi getName({id}) "
myjson = { id : 1 }
In this…

Anirudh
- 125
- 9
0
votes
1 answer
Using just Angular.js templates, without the whole framework?
Is it possible to compile Angular.js templates (ng-show, ng-if, etc) into standalone functions which accept an object and return HTML? Like other templating languages like Handlebars, Underscore.js Templates?
I would like to use the same template in…

user1527166
- 3,229
- 5
- 26
- 26
0
votes
2 answers
html/javascript: templating options in regular html
Converting a project from django into a flask API backend + backbone.js frontend
It was nice to be able to do {% include %} options in the HTML in order to make it more modular, i.e. I was able to separate out a discrete navbar.html, base.html, etc.…

fox
- 15,428
- 20
- 55
- 85
0
votes
3 answers
Is there any clean way to grab an HTML template placed in the using jQuery?
Based on Nicholas Zaka's book 'Maintainable JavaScript', I understand that the best way to put a small HTML template in my page is to add something like: