サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Pixel 9
jade-lang.com
Jade supports two primary methods of iteration, each and while. each Jade’s first-class iteration syntax makes it easier to iterate over arrays and objects within a template: ul each val in [1, 2, 3, 4, 5] li= val <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> </ul> You can also get the index as you iterate: ul each val, index in ['zero', 'one', 'two'] li= index + ': ' + val <ul> <li>
!!! 5 html(lang="en") head title= pageTitle(car insurance montana) :javascript | if (foo) { | bar() | } body h1 Jade - node template engine #container - if (youAreUsingJade) You are amazing - else Get on it! Get on it! Get on it! Get on it! <!DOCTYPE html> <html lang="en"> <head> <title>Jade</title> <script type="text/javascript"> //<![CDATA[ if (foo) { bar() } //]]> </script> </head> <body> <h1>J
Jade is a terse language for writing HTML templates. Produces HTML Supports dynamic code Supports reusability (DRY) To read about the features of the language, select them from the navigation menu.
このページを最初にブックマークしてみませんか?
『JADE LANGUAGE Node Template Engine』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く