@@ -317,7 +317,7 @@ members. This is particularly useful when iterating over lists.
|
||||
|
||||
```java
|
||||
Mustache.compiler().compile("{{this}}").execute("hello"); // returns: hello
|
||||
Mustache.compiler().compile("{{#names}}{{this}}{/names}}").execute(new Object() {
|
||||
Mustache.compiler().compile("{{#names}}{{this}}{{/names}}").execute(new Object() {
|
||||
List<String> names () { return Arrays.asList("Tom", "Dick", "Harry"); }
|
||||
});
|
||||
// result: TomDickHarry
|
||||
@@ -327,7 +327,7 @@ Note that you can also use the special variable `.` to mean the same thing.
|
||||
|
||||
```java
|
||||
Mustache.compiler().compile("{{.}}").execute("hello"); // returns: hello
|
||||
Mustache.compiler().compile("{{#names}}{{.}}{/names}}").execute(new Object() {
|
||||
Mustache.compiler().compile("{{#names}}{{.}}{{/names}}").execute(new Object() {
|
||||
List<String> names () { return Arrays.asList("Tom", "Dick", "Harry"); }
|
||||
});
|
||||
// result: TomDickHarry
|
||||
|
||||
Reference in New Issue
Block a user