mercredi 15 avril 2015

In Ember can I pass markup to a component?

I'm trying to create a dropdown type component that can have some markup for the title, and then upon hovering reveal more markup. Something like this:



{{#dropdown-menu}}

{{#dropdown-header}}
<span>My Custom Title markup</span>
{{/dropdown-header}}

{{#dropdown-body}}
list of menu items
{{/dropdown-body}}

{{/dropdown-menu}}


The body should only show while some property like isExpanded is true. But if the body is clicked, isExpanded would become false.


I can make a working component that accepts a title property (string), but I can't figure out how to make the title include custom markup.


Aucun commentaire:

Enregistrer un commentaire