From the example in the README
This code, in all situations, always results in an error if you don't pass the data to the file. I am trying to use it as, let's say, a report about whether your password was valid - if it wasn't I would render the file with
But if the user were going to the login page and it hadn't yet been posted, I would just use:
I could fix this by explicitly sending a msg = null to all routes, but I think that is silly.
Any advice on how to properly handle this? My guess is that what I am doing is somehow unconventional in node/ejs.
Thanks a bunch,
Thanks for clarifying and for both tips!
I'm actually having the same issue as @netpoetica.