dimanche 30 novembre 2014

pass parameter between two js files with express js


I wish to send variable from two different Javascript files.


router.js:



router.get('/', function(req, res){
screen_id = req.param('screen');
res.render('index',{
items:"some item"
});
});


I have another js file which called client.js, how can i have access to the items variable?


i work with ejs files.





Aucun commentaire:

Enregistrer un commentaire