I've been following a tutorial for building an auth app with admin roles using the MEAN technologies and passport, he used jade as a template engine, I tried to work with simple html5 but there is a specific property of jade that can't be converted, the property is used to bring the user status directly from the backend after a page refresh without an agularJS controller - this is the tutorial github repo : https://github.com/joeeames/MEANAppsFiles
- the jade property is : backend :
app.get('*', function(req, res) {
res.render('index', {
bootstrappedUser: req.user
});
});
}
- FrontEnd :
if !!bootstrappedUser
script.
window.bootstrappedUserObject = !{JSON.stringify(bootstrappedUser)}
Is there a way to use both html and jade or another way to do the user's session persistence after refresh without jade ? Thanks.