Update Spacebars REAMDE: mention nested sub-expressions

This commit is contained in:
Slava Kim
2015-05-16 23:49:55 -07:00
parent 092b97d2da
commit 6983e8d800

View File

@@ -495,6 +495,25 @@ We can write {{foo}} and it doesn't matter.
Comment tags can be used wherever other template tags are allowed.
## Nested sub-expressions
Sometimes an argument to a helper call is best expressed as a return value of
some other expression. For this and other cases, one can use parentheses to
express the evaluation order of nested expressions.
```handlebars
{{capitalize (getSummary post)}}
```
In this example, the result of the `getSummary` helper call will be passed to
the `capitalize` helper.
Sub-expressions can be used to calculate key-word arguments, too:
```handlebars
{{> tmpl arg=(helper post)}}
```
## HTML Dialect
Spacebars templates are written in [standard