problem about dust.js-Collection of common programming errors


  • AVP
    html web jade dust.js
    I’ve been looking all over for something that will let me precompile static websites using Grunt. It needs to have partials, so I can include things like a common header/footer across the pages.So far, I’ve only really found Jade, which has a grunt plugin, and this plugin for Grunt that compiles Dust.js templates to static HTML. I don’t really like Jade’s syntax, and the Dust plugin for Grunt is less than ideal. Any suggestions for a good static HTML templating language with Grunt support?

  • ergoon
    javascript node.js mongodb mongoose dust.js
    I have a dust.js template that should render a JSON object coming from a mongodb collection.{“author”: “Leslie Horn”,”title”: “An Awesome 132-Cube Ice Tray Exists Because People Are Assholes”,”published”: “2013-06-13T21:00:00.000Z”,”link”: “http://gizmodo.com/an-awesome-132-cube-ice-tray-exists-because-people-are-513229668″,”feed”: {“link”: {“xml”: “feed/http://feeds.gawker.com/gizmodo/excerpts.xml”,”html”: “http://gizmodo.com”},”title”: “Gizmodo”},”summary”: “<p><img alt=\”An Awesome 1

  • Elankeeran
    node.js express dust.js
    In expressjs, Dustjs Multiple templates not working getting 500 Error: Template Not Found: templatemy base dust template as below (template.dust)<div class=”page”>{+pageHeader}Hello World!{/pageHeader}<div class=”bodyContent”>{+bodyContent/}</div><div class=”footer”>{+pageFooter}<hr><a href=”/contactUs”>Contact Us</a>{/pageFooter}</div> </div>And I am trying to call this base template inside my home.dust I am getting error as belowExpress 500

  • PeeHaa
    php jquery dust.js
    Current I did the dustjs in client javascript as below<!DOCTYPE html> <html> <head><script src=”lib/dust-full-0.3.0.min.js” type=”text/javascript”></script><script src=”vendor/jquery-1.7.1.min.js” type=”text/javascript”></script><script type=”text/javascript”>$(document).ready(function(){// JSON response from server var json_object = { “profile_skill”: “Profile Skill”,”skills”: [{ “name”: “JavaScript” },{ “name”: “Ruby” },{ “name”: “Java” }]}// re

  • nalply
    html dust.js
    The partials were used in the this way but I was getting output as undefined. Created two template files parent and child that inherits from parent.parent.tl:<div><span><label>{+title}New{/title}</label></div>child.tl:{>”parent”/}{<title}{#t}<p>NEW {title1} For the Child</p>{/t} {/title}I compiled those templates using dustr and included as .js in my HTML.<script src=”https://raw.github.com/akdubya/dustjs/master/dist/dust-full-0.3.0.min.js”&g

  • godspeed
    dust.js
    I’ve just started using dust.js. And I’ve come across a problem. I need to specify a condition (json parameters existence) in template. Depending on it some inner html should be rendered or not. So according to the description I should use smth like this:{?param_name} … {:else} {/param_name}But I need to check a complex condition, so I go for logic helper – {@if..}. And it turns out that I’d like to use path in condition. So.. The result looks:{@if cond=”{myObject.property1} || {myObject.prope

  • Kevin Leary Boston WordPress
    javascript jquery asp.net-mvc json dust.js
    I’m working with jQuery 1.8.2 & Dust.js v1.1.1 for MVC-style templating within a JavaScript app. When I use the {@gt} logic helper I receive the following console error:Uncaught TypeError: Cannot read property ‘gt’ of undefinedI believe the proper syntax is used in my template:<ul class=”listview”> {#seasons}<li><h3>{name}</h3><p class=”desc”>{id}</p>{@gt key=”months” value=”0″}<span class=”count”>{months}</span>{/gt}</li> {/seasons} <

  • Jim
    javascript dust.js
    I’m using the full, Linked In version 1.2.0 of dust.js and am trying to define a filter for use when rendering a JSON view with a dust template. When I include this line in the page script:_.extend(dust.filters, {foo: function(value){ return ‘foo’; }});it results in this error in Chrome’s debugger:Uncaught ReferenceError: _ is not defined If I add the filter definition to where the other filters are in the dust .js file, it works. What am I doing wrong?

  • Jim
    javascript dust.js
    I’m trying to render HTML using compiled templates with dust.js in a browser (not server-side with node.js). If I compile the template in the client-side javascript, it works fine. If I pre-compile the template and include it as a script tag as recommended, the dust.loadSource statement results in the Chrome debugger saying: “Uncaught ReferenceError: nowork is not defined”, where “nowork” is the template name. So…This HTML and script works:<!DOCTYPE html> <html lang=”en”> <head&

Web site is in building