You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm not sure if this is the right place for this but I wasn't sure where to ask. In the current documentation for the each template helper it talks about specifying keys but makes no mention of the special values for key, namely:
@index - The index of the item in the array. @item - The item in the array itself. This can only be used for arrays of strings or numbers. @Guid - Generate a unique identifier for each object (uses Ember.guidFor).
Activity
Serabe commentedon Jun 8, 2018
After looking for it in source code, it seems that only
@index
and@identity
are used, though not sure they are public values.@rwjblue can you confirm please?
rwjblue commentedon Jun 8, 2018
Correct. The following should be considered public API’s for the specific helpers.
{{each
:@index
@identity
{{each-in
:@key
@index
@identity
Tweaks to the API docs for these helpers to add mention of the available special values seems good.
rwjblue commentedon Jun 8, 2018
Also, thought I should cross link this RFC: emberjs/rfcs#321
Serabe commentedon Jun 8, 2018
Thanks, applying labels accordingly.
pixelhandler commentedon Sep 28, 2018
@emberjs/learning-team-managers perhaps we can update the API docs accordingly
Document special values for key argument for each helper
Document special values for key argument for each helper