mardi 31 mars 2020

Self closing void tags with Ember Glimmer components

I am in the process of upgrading an Ember app to the latest version (3.17) and have run into an issue with the new Glimmer components. Not having to specify a tag name is great, but I'm not sure how to handle self closing void elements such as an

<img> 

tag. It's obvious that you can wrap your component in a closing tag element

<div><MyComponent @name="test"/></div> 

but I've not come across any examples which use a self closing tag.

Many thanks in advance.




Aucun commentaire:

Enregistrer un commentaire