Found references to data keys that are not declared in SoyDoc Exception

1,131 views
Skip to first unread message

andymurh

unread,
Aug 15, 2011, 5:15:24 AM8/15/11
to Closure Templates Discuss
I have json data: {a: null, levels: [{name: 'abc'}, {name: 'xyz'}...]}

and i wanna out list of names, so this is template:


{namespace com.andymur.reportconstructor}
/**
* @levels
*/
{template .levels}
<ul>
{foreach $level in $levels}
<li>
{$level.name}
</li>
{/foreach}
</ul>
{/template}

compilation fails with exception: In file levels.soy, template
com.andymur.reportconstructor.levels: Found references to data keys
that are not declared in SoyDoc: [levels]

How could i declare data keys in levels? Can't find in docs | google,
and can't suppose how to do it. Thanks in advance.

Raul Rangel

unread,
Aug 16, 2011, 10:18:15 AM8/16/11
to Closure Templates Discuss
your comment block is wrong
it should be @param levels

- Raul

Andy Mur

unread,
Aug 16, 2011, 11:06:57 AM8/16/11
to closure-temp...@googlegroups.com
Ok, thanks, i found it yet

2011/8/16 Raul Rangel <ism...@ismell.org>



--
С уважением, Андрей
Reply all
Reply to author
Forward
0 new messages