Questions tagged [client-side-templating]

101 questions
2
votes
1 answer

How to embed raw html string attribute into .hamlc template?

Currently I have backbone RIA with rails backend. I'm using haml_coffee_assets gem for client-side templating. But I miss rails view helpers there. I decided to add raw html strings into my backbone models. So, I have this kind of object in my…
1
vote
0 answers

Templating KaTex String through Javascript template literals

I have got KaTeX strings which I'm trying to template through javascript template literals. But the results are not rendered properly instead the raw strings $$10 b^2$$ sq. units are displayed in the UI. I have got the required Js files in the…
Maniyan
  • 35
  • 4
1
vote
2 answers

For a website with high user interaction, is it better client side rendering or server side renderin?

I'm developing a website in which a user logs into their user account, enters data to a table (i'm using Tabulator) and then the data in the table is saved (i'm using MongoDB Atlas for data storage). The website has different subpages in which the…
1
vote
2 answers

client-side templating

Its been a while since i am working with the AJAX and getting templates from server-side hence creating huge traffic. Fetching same HTML on single page with only different data, sometimes i feel guilty that i can do better than that. Then an idea…
Imran Naqvi
  • 2,202
  • 5
  • 26
  • 53
1
vote
0 answers

Is it possible to use dynamic keys in dust js?

my .properties file (test.properties): something.10.header=helloWorld something.12.header=holaWorld my.dust file: (here 'id' is the dynamic value ; it can be either 10 or 12 based on which the different content should render) {@useContent…
1
vote
1 answer

Will HTML templating mechanism works in Angular?

I am using HTML templating in my Angular app and my code is something like this: But, when the HTML was loaded, I couldn't find this script block in the DOM. How can I achieve HTML templating…
Arun Raj R
  • 2,197
  • 3
  • 13
  • 23
1
vote
2 answers

Nunjucks macro's not found if in nested folders

I have the following structure: templates - base.njk pages - index.njk components //my macro's button - button.njk - button.scss So when I do an import of my macro in my page: {% import 'button/button.njk' as btn %} This doesnt work, it…
1
vote
3 answers

JavaScript templating engine - Converting left hand ternary (without an assignment) into conditional statement(s)

I've found the perfect JavaScript templating engine, built by Krasimir, it is just what I needed. The templating engine works great but naturally I couldn't resist the urge to hack at it a bit and maybe even add a couple of features. Unfortunately I…
1
vote
2 answers

How to use passport js with client side templating?

I am using passport js to handle some authentication. However, I am also using angular $route service to handle my templating on the client side. Because of this, I am unsure how to proceed in using passport, as the examples on the doc page assume…
Zack
  • 13,454
  • 24
  • 75
  • 113
1
vote
2 answers

How to indent HTML in a Handlebars data object

So I'm using Handlebars to template a static HTML site. What I am having trouble with is indenting the HTML inside the data object copyright. If I had multiple h1's in the object, I want to able to format it nicely, like in my example. When trying…
1
vote
0 answers

Best solution for client side templating

I am working on a project with very strict company security rules which means I am unable to create CMS pages using a local server. As a result the company still makes use of old technologies such as shtml includes. This means that node.js is out of…
HGB
  • 2,157
  • 8
  • 43
  • 74
1
vote
1 answer

Dust.js client-side rendering issue with precompiled template

I'm attempting test a simple client-side render with a pre-compiled dust template, but when I attempt to render, dust complains that it can't find my template: [DUST WARN]: Chunk error [Error: Template Not Found: basicName] thrown. Ceasing to render…
josh-cain
  • 4,997
  • 7
  • 35
  • 55
1
vote
0 answers

How many ways are there to maintain handlebars template in client side

In my application we are templating handlebars from client side(we are not templating from server side).So till now we used maintaining all templated inside of the html file using script tag like in the following way.
vasan
  • 2,203
  • 3
  • 18
  • 22
1
vote
0 answers

no loaded event for handlebar templates

I'm using handlebars and handlebar jquery plugin with bootstrap modal .. my problem is that handlebar library does not provide any proper events that will be fired after a given template is compiled and rendered thus making my UI not interactive or…
1
vote
1 answer

John Resig Micro templating bug

So I am aiming to use John Resig's templating engine. I need to pass the function a variable containing the "template". However, the problem is that I need to pass something like: