title: re-render pug view with express
body: <p>Basically what I wantto achieve is a searchable/filterable listview</p>
  
  <p>so far I'm able to fetch some data from a database and have express with pug render me a page showing the results in a listview.</p>
  
  <p>Now I want to add the functionality of filtering the displayed listview.
  Therefore on every keyup event within a textbox I make an AJAX post  request to the server sending the query string from the textbox. So far everything works just fine, but when i try to "re-render" the page with the filtered resultset nothing happens in the browser.</p>
  
  <p>My routes look like this:</p>
  
  <pre><code>var rechnungen;
  
  router.get('/', function(req, res) {
  
      connection.query('SELECT * FROM rechnungen ', function(err, result) {
      rechnugen = result;
      res.render('rechnungen', {rechnungen: result});
  
  });
  
  router.post('/:query', function(req, res) {
      console.log("received ajax request");
      console.log("with query " + req.params.query);
      res.render('rechnungen', {rechnungen: {}});
  });
  </code></pre>
  
  <p>initially the query statement fetches the data and res.render works just fine, when I make the AJAX call everything seems to work as well (the console log output matches my input) but regardless what i try to pass to the view (res.render) in the post route nothing happens.</p>
  
  <p>Is it not possible to "re-render" a view or is there any other conceptional misstake I make?</p>
  
  <p>thanks for your help</p>