Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated reddit tutorial to use new iteration syntax #103

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open

Updated reddit tutorial to use new iteration syntax #103

wants to merge 1 commit into from

Conversation

segphault
Copy link
Contributor

No description provided.

@@ -84,7 +84,7 @@ At this point, the application displays a bulleted list of five items with the s

### Binding a List Item to the Current Iteration

Next, modify the `item` object so that each list item element displays the actual value of the underlying array item. The Repetition component has a special property called `objectAtCurrentIteration` that is used to access the value from the array. To make each item in the list display its number, bind the value of the `item` object to the `rep`'s `objectAtCurrentIteration` property.
Next, modify the `item` object so that each list item element displays the actual value of the underlying array item. The Repetition component has a special template property called `:iteration` that is used to access the current iteration of the content array. The actual value of the object at the current iteration is stored in `:iteration.object`. To make each item in the list display its number, bind the value of the `item` object to the `rep`'s `:iteration.object` property.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call it special, just template property. The objectAtCurrentIteration we had before was definitely special but this is a template property that any component can define.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants