问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/20161088/understanding-the-mean-stack