mercredi 28 octobre 2015

Accessing an object property with a non-standard name in HTMLBars template

{{my-component can-delete=true canDelete=true}}

In the my-component template I want to access can-delete from the attrs object.

{{attrs.can-delete}} <!-- does not work, prints blank, should print true -->
{{attrs.canDelete}} <!-- works, prints true-->

How can I access object properties from HTMLBars that are not in the usual format?




Aucun commentaire:

Enregistrer un commentaire