mercredi 7 décembre 2016

Ember JS pass a value to a component property which includes HTML

I have a very simple form field component, which displays an input with a label. components/form-field-input.hbs

<label></label>


template.hbs



Say I want the word products in the label to link to another route in my app, which lists all of the products. Is there any way that this can be done?

I'm aware that the below cannot work, as the characters will just be escaped. Is there some way that the label could be built in the parent template's JS file and passed in?

products do you like the most?" type='Text' value=favouriteProduct}}




Aucun commentaire:

Enregistrer un commentaire