Routing by back end (nodeJs) or front end (angularJs)

时间:2017-04-24 17:18:57

标签: javascript angularjs node.js ejs template-engine

today I have a very important question to ask from people experience in javascript and their respected frameworks.

I am creating an application in nodeJs and have defined routes in backend. For every html to display on client side I made route on back end with help of template engine ejs.

I can also make routes on front end too with help of ng-route and display the html page according to the defined routes. But it is not possible if you made routes on back end.

My front end code is inside the back end code in specified folder and template engine can access that folder (custom js) for viewing in html.

Some people said that you should make route on front end because same html page rendered on server side and you are sending it again to view side to render.

Is there anyone who can explain me the process effectively and which process is better ?

Motivation of application is to read the apis from back end and render the view in tabular form.

0 个答案:

没有答案