title: node ejs reference error data not defined at eval when handing data to view
body: <p>i've been closing in on a node application using express and ejs, but when i try to hand data to my view from the controller like so </p>
  
  <pre><code>var myData = {
    theData: data
  };
  res.render(path.join(__dirname + '/../views/index'), myData);
  </code></pre>
  
  <p>i get a nice error </p>
  
  <pre>
  ReferenceError:.. myData is not defined eval (from ejs lib)
  </pre>
  
  <p>when trying to access myData in the view like so</p>
  
  <pre><code>var data = &lt;%-myData%&gt;;
  </code></pre>
  
  <p>or in any other way basically, i've tried stringifying the data, wrapping it in another object and stuff like that but it still just won't show up, i have the feeling i'm missing something really basic here, does anyone have an idea on how to fix this?</p>