UNPKG

1.94 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="zh_CN" class="html-">
3<body>
4 <!-- test let fature -->
5 <% let testLet = "let" %>
6 <h4>aries is support that: <%= testLet %></h4>
7
8 <!-- test const fature -->
9 <% const testConst = "const"; %>
10 <h4>aries is support that: <%= testConst %></h4>
11
12 <!-- test template string fature -->
13 <% let tempString = "string"; %>
14 <% let templateString = `template ${tempString} `;%>
15 <h4>aries is support that: <%= templateString %></h4>
16
17 <!-- test string.raw string fature -->
18 <% var stringRaw = String.raw({ raw: 'srn.a ' }, 't', 'i', 'g', 'r', 'w'); %>
19 <h4>aries is support that: <%= stringRaw %></h4>
20
21 <!-- test Symbol fature -->
22 <% if( Symbol.for("bar") === Symbol.for("bar") ){ %>
23 <h4>aries is support that: <%= "Symbol" %></h4>
24 <% } %>
25
26 <!-- test map fature -->
27 <% var m = new Map(); %>
28 <% var o = {p: "Hello World"};%>
29 <% m.set(o, "map"); %>
30 <% let testMap = m.get(o); %>
31 <h4>aries is support that: <%= testMap %></h4>
32
33 <!-- <%= ctx.fsdsdfsdfsd %> -->
34 <% function* helloWorldGenerator() { %>
35 <% yield 'Generator'; %>
36 <% return 'ending'; %>
37 <% } %>
38 <% let hw = helloWorldGenerator(); %>
39 <% let testGenerator = hw.next().value; %>
40 <h4>aries is support that: <%= testGenerator %></h4>
41
42 <!-- test arrow functions fature -->
43 <% let testArrowFunction = ""; %>
44 <% ["arrow","fuction"].forEach((x) => { %>
45 <% testArrowFunction += ' ' +x; %>
46 <% })%>
47 <h4>aries is support that: <%= testArrowFunction %></h4>
48
49 <!-- test for .. of fature -->
50 <% var str = ''; %>
51 <% for (let item of 'for...of') { %>
52 <% str += item; %>
53 <% } %>
54 <h4>aries is support that: <%= str %></h4>
55
56 <!-- test for .. of fature -->
57 <% include "foot.html" %>
58
59
60 <!-- test for .. of fature ,includeId and transfer param, in foot tpl, use ctx.param1 and ctx.param2 to get it-->
61 <% includeId "foot?param1=1&param2=2" %>
62
63</body>
64</html>
\No newline at end of file