Skip to content Skip to sidebar Skip to footer

Expressjs Res.render Not Rendering Values In Angularjs Partials

I am redirecting to next page after login on expressjs after login, I have some partials to be loaded from angularjs routers which is all fine and working. In res.render I have som

Solution 1:

I have something like this in my jade template (I'm sending an api object and a token)

script(type="text/javascript").
        var api = !{JSON.stringify(api)} , token= '!{token}';

I declare both as global variables that I re-use in AngularJS. Hope this helps.

Post a Comment for "Expressjs Res.render Not Rendering Values In Angularjs Partials"