lundi 7 mai 2018

Ember JS: How can I practice 'Data Down, Actions Up' with composable helpers?

New to ember and practicing 'Data Down, Actions Up' with composable helpers. Is this possible? This is what I'm attempting to do:

//parent template


//child component template
<div >

But I get a 'no action handler for: toggleToppings' error.

So then I tried making an action on the child, like so:

//child component template 
<div >

//child component JS
actions: {
   togglePizza() {
          this.get('toggleToppings')();
   }
}

But when I click on that, nothing happens at all. :( How can I call my parent action from within my component template?




Aucun commentaire:

Enregistrer un commentaire