Questions tagged [dot.js]

doT.js is a JavaScript templating function with emphasis on performance under V8 and Node.js.

doT.js is a JavaScript templating function with emphasis on performance under V8 and Node.js.

Useful Links:

45 questions
2
votes
1 answer

how to use html files and partial view templates in dot.js

I'm using doT.js as template engine and I need to use html files as partial view templates. is there any way to pass urls instead of html string for templates?
s korhani
  • 356
  • 4
  • 12
2
votes
1 answer

Conflict JavaScript templating

I am writing project on Node.js + Express.js with templating Swig. On the user side using a template system doT.js The question arose in the browser to pass a line like:

string {{= it.stringVar}} But I do not know how to make Swig not…

2
votes
1 answer

"with" and "no with" in template engines

I am on a search for a javascript template engine that has good performance when used in large js applications and is also very suitable for mobile applications. So I have gone through the various jsPerf-tests for these. There seems to be a lot…
bhargav
  • 619
  • 2
  • 14
  • 30
1
vote
3 answers

Eclipse JFace editor with JavaScript support

I'm developing Eclipse editor with SWT/JFace for doT.js template engine. I have done tags highlighting, content assist with doT.js global variables and tags. But I'm new at Eclipse plugin development and I have a probleem. Problem is that inside…
Vants
  • 88
  • 1
  • 7
1
vote
2 answers

Converting `grunt.file.readJSON` to gulp

I'm in the process of converting a Grunt file to a Gulp file. My Grunt file contains the following line var config = grunt.file.readJSON('json/config.json'); What this line is doing is that it is setting some variables which it then injects into…
Ali Samii
  • 1,672
  • 4
  • 28
  • 49
1
vote
2 answers

External templates with doT.js?

I'm using doT.js in order to manage view templates and so on, I wanted to load an external template (placing it in another folder then loading it like a CSS file or a JS file) is it possible to make this with doT.js? If not, what templating engine…
1
vote
0 answers

Wrong parse dot.js template after migrating to asp.net mvc 4

After migrating from mvc 3 to mvc 4 Razor v.2 wrong parse my js template. Problem in the next {{if}} section {{? (it.@Model.GetPropName(x => x.Children)).length < it.@Model.GetPropName(x => x.ChildTaskTotalCount)}} {{?}} Razor v2…
1
vote
2 answers

How to include headers, footers in dot.js templating engine?

I thought all I have to do (according to docs on git hub) is to put {{#def.loadfile('/snippet.txt')}} into my template so it would look like this: Data
0
votes
0 answers

jQuery QueryBuilder doT.js template syntax inside twig file

I try to rewrite the rule template like this: $(queryBuilderId).queryBuilder({ templates: { rule: '\
\
Sireini
  • 4,142
  • 12
  • 52
  • 91
0
votes
1 answer

dot.js working with array

I have a problem working with dot when I have template like this {{=it.data[0].visitors}} so this doesn't work var data = [{ visitors: 10 }]; var tempFn = doT.template("

Here is a sample template {{=it.data[0].visitors}}

"); var…
A.B
  • 1
0
votes
1 answer

Dot.js and Angular: Any way to standardize html templates between frameworks?

DoT.js website, shows template data binding or interpolation as {{= it.modelFieldName }} Angular 2+ shows {{modelFieldName}} Aside from a string replacement before we use the template, how can Dot.js use {{modelFieldName}}, removing the = it. and…
Zachary Scott
  • 20,968
  • 35
  • 123
  • 205
0
votes
1 answer

translating ejs injection to .dot engine way

Hey guy i'm having trouble to get this work, any help would be much apreciated I usually use this in my ejs engine template <%= blog.created_at.getFullYear() %> <%= blog.short_name.replace(new RegExp(" ", "g"), "-") %> <%=…
MikZuit
  • 684
  • 5
  • 17
0
votes
1 answer

How to crawl a website that uses JavaScript using beautifulsoup?

{{=it.title}}

Hari Krishnan
  • 2,049
  • 2
  • 18
  • 29
0
votes
1 answer

Loops and Variables in Express/doT.js, figuring out how to print MySQL results correctly

In my Express route I grab a bunch of entries from a MySQL database. These entries are words, and have associated line numbers, so that all words on the same line need to be printed together before a line break. word | …
Kramhsiri
  • 119
  • 9
0
votes
1 answer

Can I get the html dom val when I using dot.js temple?

Now I am using dot.js ,in the web page,I have a span call 'spanHelloword' and its value is "helloworld".I want to get the span value in dot temple,How to do that?