Issue with Rendering templates with jade, express, and node.js -


I am new to node. Js, Jade, & amp; Express, so please stand with me.

I have the following files.

layout.zade

  Layout block content label initial layout form (action = "/ getReports", method = "GET" , Enctype = "multipart / form-data") input (type = 'submit', value = 'generate report')  

child.jade

  Expanded index block attachment attaches to child  

server.js

  apgate ('/ millarports', function (reserve, rick) {Res.render ("child.jade");});  

Process:

  1. The user arrives at the site and loads
  2. The call will present the child's template which is just " Added children "should be added.
  3. For the contents section of Index.jade.

However, I'm not seeing this. I think I am trying to understand the best approach to adding a partial template to the original index. Z Page

The problem I am having is that this code is the customer side index.jade page. The button triggers an action call on the server. If the server processes the data, then take the target data and process that template, which it had to display on the index.jade page.

Generally, without jade template files, I just use javascript and naive manner on which only client side java code triggers AJAX call and use of DOM in response To do html with the processed data, but I wanted to take advantage of Z.

Any advice appreciated, thanks, D

.jade is included. res ,
  1. will work.

  2. In your "> attach block content is incorrect because There is no block with that name if you want to do some partial render in the index page, then you should specify a block in "index.jade" Layout block content label initial layout form (action = "/ getReports", method = "GET", enctype = "multipart / form-data") input (type = 'submit', value = 'generate report') block

    and "child.jade",

      increases block label label labels  
< / Div>

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

javascript - amcharts makechart not working -