javascript - Angularjs access res.render variables -


i passing variable data res.render this

res.render('employment/employment', { title: 'sheet | employee',username:     req.session.name,datetime:result-date,time-sheet:time-sheet}); 

the above first render. , in angularjs have route this

$routeprovider .when('/employeetimesheet',{ controller:'mainctrl', templateurl:'/partials/employeetimesheet.html' }) .when('/employeelogin',{ controller:'mainctrl', templateurl:'/employeedashboard' }) .otherwise({redirectto:'/employeelogin'});  }); 

so redirects employeelogin. here have partial , route on expressjs

app.get('/employeedashboard', function(req, res){ res.render('employelogin/employeedashboard'); }); 

here problem partial keeps on loading..many times , need pass data 1 render render.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -