source: Dev/branches/play-2.0.1/documentation/manual/sandbox/Declare-anonymous-function-in-templates.md @ 322

Last change on this file since 322 was 322, checked in by hendrikvanantwerpen, 13 years ago

Added Play! framework and application with Jena dependency. Working on
the basic things now (login/register), after that start implementing
our data model.

File size: 331 bytes
Line 
1Sometimes you need to declare a variable in your template, but since we're more in a functional environnement we will prefer to declare an anonymous function thanks to `@using(){}` :
2
3    <ul>
4        @using( Map(...) ){ values =>
5            @for( toto <- values ){
6                <li>toto</li>
7            }
8        }
9    </ul>
Note: See TracBrowser for help on using the repository browser.