Add Closure Templates (#3634)

* Add Closure Templates to languages.yml

* Run script/add-grammar

* Add sample

* Run script/set-language-ids

* Add codemirror_mime_type
This commit is contained in:
Michael Hadley
2017-05-25 01:15:32 -07:00
committed by Colin Seymour
parent 234ee8b6d2
commit 20fdac95f6
7 changed files with 70 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
{namespace Exmaple}
/**
* Example
*/
{template .foo}
{@param count: string}
{@param? name: int}
{if isNonnull($name)}
<h1>{$name}</h1>
{/if}
<div class="content">
{switch count}
{case 0}
{call Empty.view}
{param count: $count /}
{/call}
{default}
<h2>Wow, so many!</h2>
{/switch}
</div>
{/template}