javascript - How to access res.locals on client-side -


i'm attempting pass req.user details client-side angular code using res.locals in express route:

'use strict';  var path = require('path');  var player = function(req, res) {   res.locals.player = req.player;   res.sendfile(path.join(__dirname, '../assets', 'index.html')); };  module.exports = {   player: player }; 

the html renders expected, i'm not sure how access res.locals.player now.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -