I have a component the main purpose of which is to display a row of items. Every row has a delete button to make it possible to delete a row. How is possible to pass an action from a template to the component which will trigger an action in a router ?
Here is the template using the component:
#templates/holiday-hours.hbs
Here is the component template:
# templates/components/holiday-hour.hbs
...
div class="col-sm-1">
<button type="button" class="btn btn-danger btn-sm mt-1" >
<span class="oi oi-trash"></span>
</button>
</div>
I'm using the same component to display a row and to create a new item (holiday-hour
).
I'm using ember 3.1.2
Thank you
Aucun commentaire:
Enregistrer un commentaire