当前位置: 动力学知识库 > 问答 > 编程问答 >

node.js - Understanding the MEAN stack

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: