问题描述:

Just a quick question. I have searched for a user group to post this in a more suitable location to no avail.

I am getting familiar with the MEAN stack: https://github.com/linnovate/mean

However I cannot see the reason for the separation into .jade templates under app/views, and .html under public.

Anyone know the logic behind this?

网友答案:

html files are static, they are delivered as is to the user, which is why they are stored in public folder. jade are templates, they are usually dynamically rendered (converted to html) per request. You can supply a data object (like user/session information) to templates to render html accordingly.

相关阅读:
Top