title: (not) passing a local variables to Jade templates in Express (node.js)
body: <p>Here is my scenario: I have a login.jade template where I authenticate users. Inside that template I have a few if's like:</p>
  
  <pre><code>- if (badLogin)
          div#loginErr
            | &lt;strong&gt;Please try again&lt;/strong&gt; |
            | The password or username you entered is incorrect.
  
  - if (loginError)
          div#loginErr
            | &lt;strong&gt;Please try again later&lt;/strong&gt; |
            | Our authentication service isn't available at the moment.
  </code></pre>
  
  <p>In Express I ALWAYS have to declare ALL local variables that MIGHT be used in that Jade template. Otherwise I get:</p>
  
  <pre><code>loginError is not defined
  </code></pre>
  
  <p>My point is that if in Jade template I would have 10 'if' statements containing a local variable than while rendering I would have to always pass this 10 variables EVEN IF I would only use one in that particular case.</p>
  
  <p>I just thought that if I do not pass any variable to Jade template that the result of "if(var)" would be just "false".</p>
  
  <p>Any chances of working this around?</p>