Soy (Closure Template) mode

x
 
1
{namespace example}
2
3
/**
4
 * Says hello to the world.
5
 */
6
{template .helloWorld}
7
  {@param name: string}
8
  {@param? score: number}
9
  Hello <b>{$name}</b>!
10
  <div>
11
    {if $score}
12
      <em>{$score} points</em>
13
    {else}
14
      no score
15
    {/if}
16
  </div>
17
{/template}
18
19
{template .alertHelloWorld kind="js"}
20
  alert('Hello World');
21
{/template}
22

A mode for Closure Templates (Soy).

MIME type defined: text/x-soy.