node ejs reference error data not defined at eval when handing data to view
问题 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 var myData = { theData: data }; res.render(path.join(__dirname + '/../views/index'), myData); i get a nice error ReferenceError:.. myData is not defined eval (from ejs lib) when trying to access myData in the view like so var data = <%-myData%>; or in any other way basically, i've tried stringifying the data, wrapping it in another object and stuff like that but