Reputation: 23
I have 2 models loaded into my route and am trying to render a component for each into the same template as below:
{{#each fav in favs}}
{{user-fav fav=fav}}
{{/each}}
{{#each tag in tags}}
{{user-tag tag=tag}}
{{/each}}
The favs models load fine but the tags gives an error : 'Failed to execute 'createElement' on 'Document': The tag name provided ('telegram-client@model:tag::ember763:JavaScript') is not a valid name.'
If I remove the {{user-tag}} component and insert the HTML its fine and all tags are rendered.
I've deleted the component and generated a new blank one with no html or js with no success. I've also renamed the tagName property to TagId but that doesn't work either.
I've tried {{user-tag tag=tags}} outside the each helper as suggested and that gives a similar error : Failed to execute 'createElement' on 'Document': The tag name provided ('DS.FilteredRecordArray:ember468') is not a valid name. I've also tried rendering it in different components and partials with the same error.
I presume this is a bug in HTMLbars and I'm going to update Ember-cli eventually (I'm using v0.2.3) but any other advice much appreciated.
Upvotes: 1
Views: 1956
Reputation: 23
I renamed the component to {{user-tag cat=tag}} and that works now, so tag must be a reserved word in Ember components.
Upvotes: 0