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
0
votes
1 answer

Fetch doT template from the server with JAVA Spring

I started to work with JAVA Spring recently as operator for server-side. I have doT.js template laying on the server, so when clicking on navigation bar button - I need to fetch somehow this template and after rendering it with javascript - append…
Dancyg
  • 139
  • 1
  • 15
0
votes
2 answers

How to pass object to partial in dot.js

I am trying to pass a new created object to my dot.js partial snippet like this : try { var tempFn = doT.template($('#myTpl').text()); var resultText = tempFn({ "foo": "this snippet" }); $('#result').html(resultText); } catch (e)…
Aure77
  • 3,034
  • 7
  • 33
  • 53
0
votes
1 answer

doT.js returning [object HTMLScriptElement]

doT.js Beginner here, so be gentle. I'm trying to start simple with the framework. After reading through the front page, I was able to get all the examples there to work. However, porting doT.js to my own solution appears to be more of a challenge…
invot
  • 533
  • 7
  • 30
0
votes
1 answer

Render def file independently in dot.js

I am including a header.def file in index.dot using {{#def.header}} snippet and rendering the index.dot file using the following snippet. var dotjs = require('dot'); var dots = dotjs.process({ path: "./views"}); app.get('/',function(request,…
Saurabh Kumar
  • 125
  • 11
0
votes
1 answer

jquery-ui tag "a" inside tooltip click event

fellows! I'm doing some frontend work using doT.js for generating content and jquery-ui for displaying tooltips. {{##def.defboardtooltip:
Ronar
  • 7
  • 3
0
votes
1 answer

why do I get Error: ENOENT open error when trying to render a doT.js view

I am trying out doT.js for the first time and have written a very basic server setup: 'use strict'; var express = require('express'); var app = express(); var doT = require('express-dot'); var pub = __dirname+'/public'; var vws =…
Finglish
  • 9,692
  • 14
  • 70
  • 114
0
votes
1 answer

'-' character causing express dot to crash

I am getting an error trying to parse a JSON structure with Node.js, Express and DoT. It appears to be processing special characters in the JSON object below... {{= "Overview: " + record._source.explanation.overview + " Name: " +…
Alex
  • 397
  • 4
  • 18
0
votes
1 answer

How does the doT.js Plugin for PHPstorm work?

I want to use doT.js-Templates in JetBrains PHPStorm. I found a plugin on the JetBrains Plugin-Site http://plugins.jetbrains.com/plugin/7327?pr=idea for doT-Templates. I installed it and restarted the IDE, but it doesn't seem like anything has…
0
votes
1 answer

How to compile doT.js partials from a file into a string?

Hi I'm new to node and I'm trying to figure out how to compile partials from a file into a string using doT.js (http://olado.github.io/doT/index.html). /controllers/system/index.js: var util = require( 'util' ), fs = require( 'fs' ), dot =…
Jonathan
  • 543
  • 9
  • 23
0
votes
1 answer

Backbone and dot.js

I am new to both backbone and dot.js. I need help in integrating external dot.js file in to my backbone file. My backbone file looks like success :function() { SearchView = Backbone.View.extend({ template:…
0
votes
1 answer

Integrate doT.js template with backbone

Please help me with process to integrate doT.js template in Backbone framework. Ie i need to override the backbone view with doTjs. Thanks for the help
0
votes
3 answers

Javascript Performance Issue with long page

I am working with a really long page with over 3400 items. Each of those items has a form with 3 buttons and each form has a jQuery $.on() click event attached to it. I am thinking that this is what is causing my issues (slow response to hover,…
Sultan Shakir
  • 724
  • 2
  • 11
  • 22
0
votes
1 answer

Do empty arrays in JSON hurt performance when parsing the JSON dataset?

I have a rather large JSON data set that I am parsing through using DoT.js to populate a template for display. I see that there are over 3400 empty arrays for a portion of the JSON that I am not even using to populate the template. Here is the…
Sultan Shakir
  • 724
  • 2
  • 11
  • 22
0
votes
1 answer

JavaScript templates in Chrome plugins

I am looking for a JavaScript Template Engine of some sorts that is supported in Chrome Extensions preferably without setting 'unsafe-eval'. Now looking at other questions in here they suggest Pre-compiling templates before deployment, however that…
Jens
  • 3,353
  • 1
  • 23
  • 27
-1
votes
1 answer

Combine gulp tasks to avoid creating the unnecessary files

I'm using two separate gulp tasks to minify templates into js file (1) and concat all js file of the project to the only minified (2). gulp.task('templates', function() { // RESULT of this task return gulp.src('templates/**/*.html') …
1 2
3