Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Typo

  • Loading branch information...
commit 10d985c7c4919eb8ae7aea1da0589dd7f57a86e0 1 parent 1d8cb17
@groue authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Guides/sample_code/indexes.md
View
2  Guides/sample_code/indexes.md
@@ -221,7 +221,7 @@ It must "*provide a Mustache section both values for the `position`, `isOdd`, an
It looks like we have two sets of informations here: the original object's properties on one side, and the position keys on the other side.
-This sounds like the job of the [Mustache context stack guide](../runtime/context_stack.md): generally speaking, in the template snippet `{{#outer}}{{#inner}}...{{/inner}}{{/outer}}`, the enclosed content can access both properties of `inner` and `outer`. If a key can not be found in `inner`, the lookup goes on in the context of the enclosing section, `outer`, etc.
+This sounds like the job of the Mustache [context stack](../runtime/context_stack.md): generally speaking, in the template snippet `{{#outer}}{{#inner}}...{{/inner}}{{/outer}}`, the enclosed content can access both properties of `inner` and `outer`. If a key can not be found in `inner`, the lookup goes on in the context of the enclosing section, `outer`, etc.
Let's get back to our specific `PositionFilterItem` class. It is used when Mustache renders an array: `{{# withPosition(people) }}...{{/ withPosition(people) }}`. If we wrap the inner section string with another section, that we bind to the original object, as in `{{#originalObject}}...{{/originalObject}}`, then the inner section will have access to both our `PositionFilterItem` properties, and the original object's properties. Exactly what we need, actually.
Please sign in to comment.
Something went wrong with that request. Please try again.