mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Update Spacebars REAMDE: mention nested sub-expressions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user