angularjs - How to route to combine EJS engine with HTML + Angular JS -
on express js server, trying combine :
- (a) integration of passport using ejs engine
- (b) html , angular js.
for (a), routing , authentication on routing performed on side of ejs engine (/project/config/route.js).
for (b), routing performed on server.js (project/server.js) toward subdirectory (/project/public/www/).
is way redirect (a) (/config/route.js) (b) (/project/public/www) pages in (b) using ejs engine authentication route system technologies on (a)?
i solved problem in 2 steps :
(1) modifying ejs engine declaration (2) move route secure pages on ejs route file.
(1) on server.js :
app.engine('html', require('ejs').renderfile); app.set('view engine', 'html'); (2) moved routing ejs routing on (a).
and access elements of (b) it, using technology of (a).
Comments
Post a Comment