[英]NodeJs - Sharing a list of categories across all pages
I am building a website where the navigation bar contains a drop down list which contains the following categories:我正在构建一个网站,其中导航栏包含一个包含以下类别的下拉列表:
Do i need to retrieve the above categories every time a new page of my application is requested.每次请求我的应用程序的新页面时,我是否需要检索上述类别。 For example:例如:
I know that my approach is not efficient, Is there a better way to accomplish it.我知道我的方法效率不高,有没有更好的方法来实现它。
Kindly note that i am using pug template engine请注意,我正在使用 pug 模板引擎
Thanks谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.