Proper way to set tagName on {{#each}}?

If I try to set a tagName on an each helper I get a deprecation warning:

{{#each thing in controller tagName="ul"}}
{{/each}}

gives me:

DEPRECATION: Supplying a tagName to Metamorph views is unreliable and is deprecated. You may be setting the tagName on a Handlebars helper that creates a Metamorph.

It looks like I can set a tag attribute on the collection helper like:

{{#collection valueBinding="controller" tag="ul}}

I find each to be far more readable, but it doesn’t seem to support that attribute. Is it possible to change the collection view’s tag on an each?

I withdraw my question. It would appear the each helper no longer renders div tags, so you can wrap any tags you need around it or directly inside of it. Well played Ember.

Yup :slight_smile: Though we should make it work if you pass tagName anyway.

This topic was automatically closed after 3 days. New replies are no longer allowed.