cea0d08c1d
Fixed textnode bug, whitespace was being removed. Added added local name for #with and #each. Form of ${#each list [localName]} and ${#with object [localNme]} Added ability to call another template (located in the same tmpl file). Form is ${#templateName(parms)}
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9728009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5665 260f80e4-7a28-3924-810f-c04153c831b5
28 lines
799 B
Cheetah
28 lines
799 B
Cheetah
template NestedView(Person person1, Person person2) {
|
|
<div>
|
|
<span var=a1>
|
|
<h1>
|
|
${#with person1 p1}
|
|
<div>
|
|
<span>${p1.name}</span>
|
|
<span>-</span>
|
|
<span>${p1.age}</span>
|
|
<div style="background-color:yellow;">
|
|
${#with person2 p2}
|
|
<div>
|
|
<span style="color:green;">${p2.age}</span>
|
|
<span>-</span>
|
|
<span style="color:green;">${p2.name}</span>
|
|
<div style="color:blue;font-weight:bold">${p1.name}=${p2.age}</div>
|
|
</div>
|
|
${/with}
|
|
<div style="background-color:green; color: red;">${p1.name}</div>
|
|
</div>
|
|
</div>
|
|
${/with}
|
|
</h1>
|
|
</span>
|
|
</div>
|
|
}
|
|
|