Questions tagged [client-side-templating]

101 questions
2
votes
2 answers

Render views without any controller in Play

I am building an application using Play for Model and Controller, but using backbone.js, and client side templating. Now, I want the html templates to be served by Play without any backing controller. I know I could put my templates in the public…
2
votes
2 answers

Client side templating and search engine referencing

I keep hearing about javascript templating engines like knockoutjs or backbone recently. They all seem pretty cool but I was wondering if using such systems prevents good indexing of web pages. Are the search engines' crawlers able to parse the…
2
votes
1 answer

Using .data() method in jQote – client-side templating plugin

For the past few weeks, i have been using jQote – client-side templating plugin to generate html fragments in runtime. For months i have been using the dom attributes like, id, class, alt to store critical data. Now, I came to know about .data()…
user405398
2
votes
1 answer

Client side template engine with XML support

Is there any client side template engine with XML/ XPath support? I looked into handlebars, mustache, underscore etc. but looks like they only can accept a JSON object as it's context. What I'm really looking for is to have xpath in…
2
votes
1 answer

Loop in Nunjucks behaving differently depending on inner HTML markup

I have the following Nunjucks template supposed to render a list of items as list: {% for item in items %}
  • {{item.title}}
  • {% endfor %} and as table {% for item in items %} …
    user5113474
    2
    votes
    1 answer

    Please explain me the Service-Oriented Composition architecture described by Mr. Udi Dahan

    Can anybody please explain me with a step by step example as how to satisfy the Service-Oriented Composition described by Mr. Udi Dahan. You will find an equivalent diagram in the same blog. Technology I am using is AngularJS, Asp.net WebAPI. I…
    priyanka.sarkar
    • 25,766
    • 43
    • 127
    • 173
    2
    votes
    1 answer

    Is there a Facelets-like feature in AngularJS where views define the template and its replaceable parts?

    If you know Facelets, it isn't something like a simple JSP include or angular ng-include where the template itself defines what contents should be in the template. In Facelets, the template only defines which parts of it are dynamic or replaceable…
    supertonsky
    • 2,563
    • 6
    • 38
    • 68
    2
    votes
    3 answers

    Share templates between Laravel and JavaScript

    How do I share template information between my PHP backend and JavaScript / AJAX requests? Times ago I just sent my AJAX requests and had the HTML generated by the server and sent as such. Today I have my AJAX data as JSON but I have no idea how to…
    Loilo
    • 13,466
    • 8
    • 37
    • 47
    2
    votes
    0 answers

    Prevent certain tags from being escaped with Underscore templates

    I'm using Underscore templates and would like to leverage their HTML escaping functionality while allowing some tags to still come through. Looking over their implementation, though, it appears that it's an all-or-nothing situation: with escaping…
    2
    votes
    1 answer

    Conditional Statements in Client Side Templating with Dust.js

    Here is a jsfiddle of the following to play with. Say I have this JSON data: { "people": [ { "name": "Bob", "eye-color": "Green" }, { "name": "Jill", "eye-color": "Blue" …
    2
    votes
    2 answers

    One-off rendering of an angular template string

    I am writing a directive to integrate SlickGrid with my angular app. I want to be able to configure SlickGrid columns with an angular template (instead of a formatter function). To achieve this, I need the directive to dynamically create formatter…
    lukecyca
    • 224
    • 3
    • 10
    2
    votes
    2 answers

    Templating HTML with hidden state instead of comment or custom script tag

    Javascript best practices & conventions, such as those emphasized by John Resig and by Nicholas Zachas, author of book Maintainable JavaScript, suggest using HTML comments or script tags with a custom type to store HTML templates. Comment…
    Jon Davis
    • 6,562
    • 5
    • 43
    • 60
    2
    votes
    1 answer

    merge javascript files in directory with node uglify + watch?

    Goal: I am trying to build an effortless workflow for client side templating development. Doc Root: /views/uncompiled/ /static/js/compiled/ We start in /views/uncompiled/ This is where I can build stuff out, like /views/uncompiled/index.html for…
    Dan Kanze
    • 18,485
    • 28
    • 81
    • 134
    2
    votes
    1 answer

    Client side vs server side vs Hybrid templating for django backend

    I am wondering whether it is worth converting to a more generic templating engine such as mustache or handlebars instead of Django templates. The options I see for myself are: Stay with Django Templates (only server side) Convert completely to…
    Sid
    • 7,511
    • 2
    • 28
    • 41
    2
    votes
    1 answer

    What are the advantages of client-side templating (mustache-like)

    In order to avoid writing JavaScript code that manually generates HTML for dynamic pages (which is not only ugly, but not DRY at all), and having simplicity and elegance in mind (as opposed to performance), what are the advantages of using string…
    Facundo Olano
    • 2,492
    • 2
    • 26
    • 32