Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Partials using Collection
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
lutaeko  
View profile  
 More options May 14 2012, 12:02 pm
From: lutaeko <luta...@gmail.com>
Date: Mon, 14 May 2012 09:02:17 -0700 (PDT)
Local: Mon, May 14 2012 12:02 pm
Subject: Partials using Collection
Hi

I am having problems using partials with collection, it's not working.
This is my code:

app.js
  app.get('/test', routes.test);

routes/index.js
  var graphics_mod = [
   {divName: 'div1' ,title: 'Title 1'},
   {divName: 'div2' ,title: 'Title 2' },
   {divName: 'div3' ,title: 'Title 3'},
   {divName: 'div4' ,title: 'Title 4'}
  ];
  exports.test = function(req,res) {
    res.render('test', {graphics_var: graphics_mod})
  };

test.jade
  != partial('partials/graphics',{collection: graphics_var});

partials/graphics.jade
  div(id="graphics_var.divName") graphics_var.title

The best I could get was that four divs where created but no title or
div name, they show as undefined.
There's got to be something wrong, I just can't see it. I tried every
tutorial/video/helper I could find, but I am new here and out of
options..

Thank you in advance,
Lucia


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.