循环在玉(当前称为“Pug”)模板引擎 [英] Loop in Jade (currently known as "Pug") template engine

查看:141
本文介绍了循环在玉(当前称为“Pug”)模板引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在翡翠引擎中使用它?我正在使用Node.js并使用expressjs框架。

解决方案

例如:

   -  for(var i = 0; i< 10; ++ i){
li = array [i]
- }

您可能会看到 https://github.com/visionmedia/jade 了解详细文件。


I want to use a simple loop like for(int i=0; i<10; i++){}.

How do I use it in the Jade engine? I'm working with Node.js and use the expressjs framework.

解决方案

for example:

- for (var i = 0; i < 10; ++i) {
  li= array[i]
- }

you may see https://github.com/visionmedia/jade for detailed document.

这篇关于循环在玉(当前称为“Pug”)模板引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆