In Ember 1.13 the following code generates a warning:
{{#each widgetNames as |widgetName|}} {{component widgetName removeWidget="removeWidget"}} {{/each}}
Where widgetNames is an array of strings in a parent controller.
widgetNames: []
In Ember 1.13 I now get this warning:
WARNING: Using
{{each}}
without specifying a key can lead to unusual behavior. Please specify akey
that identifies a unique value on each item being iterated. E.g.{{each model key="@guid" as |item|}}
.
This would be easy enough to fix in you typical model scenario, but how do I specify a key for an array of strings?
Edit: This question handles a warning you now get in Ember 1.13 when iterating over an array of strings. If you hit this warning you are not explicitly looking to find the @index parameter like Accessing Index in #each in emberjs. Infact, Artych's answer shows two other possible keys to use that would not be relevant or present in an answer to Accessing Index in #each in emberjs as this is specific to the @index parameter itself.