-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdynamic-rerender.html
55 lines (37 loc) · 981 Bytes
/
dynamic-rerender.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<head>
<title>dynamic-rerender</title>
</head>
<body>
</body>
<template name="mainTpl">
<div class="controls">
<input class="remove" type="button" value="Remove Content"/>
<input class="add" type="button" value="Add Back Content"/>
<br>
____________________________________
<p>
<input class="mango" type="button" value="Show Mango"/>
<input class="apple" type="button" value="Show Apple"/>
</p>
</div>
<div class="main">
<h1>Dynamic Content Below</h1>
<div class="dynamicContent">
Everything here will be replaced and re-added.<br>
{{yield "child"}}
</div>
<br>
</div>
</template>
<template name="childTpl">
{{> fruitsTpl}}
</template>
<template name="fruitsTpl">
<strong>Fruit Selected:</strong>
{{#each fruits}}
{{name}}
{{/each}}
</template>
<template name="layout">
{{yield}}
</template>