It may well be that you should use simply:

res.redirect('profile',{locals :{email:"profile.email"}});

without the / on /profile.


On Tue, May 1, 2012 at 9:53 AM, Bika <[email protected]> wrote:

> I guess that the problem is with res.redirect, as it redirects your
> browser, instead of directly rendering your jade template, your locals
> object is not passed to the jade rendering when finally /profile is handled
>
> you could call
>
> res.render('profile.jade',{**locals :{email:"profile.email"}});
>
> (or something similar)
>
>
> 2012. április 29., vasárnap 22:07:03 UTC+2 időpontban Feras Odeh a
> következőt írta:
>
>> I want to set input value in my user profile to its db values if they are
>> exists. I tried to use parameter passing in jade for this but I got the
>> following error:
>>
>> referenceError: /Users/Feras/Sites/wowito/**views/profile.jade:13
>>     11|         fieldset(data-role='**controlgroup')
>>     12|          label.label(for='email')  EMail
>>   > 13|          
>> input.input(id='email',type='**text',value=email,name='email'**)
>>     14|          label.label(for='firstName')  First Name
>>     15|          
>> input.input(id='firstName',**type='text',value='',name='**firstName')
>>     16|          label.label(for='lastName')  Last Name
>>
>> email is not defined
>>
>> but when I render this templat I send it email as locals
>>
>> res.redirect('/profile',{**locals :{email:"profile.email"}});
>>
>> I tried also to set input value to !{email} and #{email} but nothing
>> works. any help?
>>
>> Thanks,
>>
>> Feras
>>
>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to