I've been learning Ember over the past few months, and with the beta release of 2.0 I've working on following the "data down, actions up" structure with my components. Unfortunately, this means actions are getting thrown all over the place and it's not very appealing to define them in every component and every template, only to be like, "yes, keep bubbling this up to the controller please". Is there any way to pass actions in groups or nest them so that in my handlebars templates I can just use something like {{my-component myActionGroup=myActionGroup}} and then unpack them within the component definition? Or maybe a setting to tell ember to allow component actions to bubble?
The component I'm working on right now is for nested sets, so I'm ending up with really deeply nested components. Keeping them all straight is pretty awful and doesn't seem very DRY to me since changing the name of one requires changing the associated one in close to ten other files. I know I could just reroute one to another in the handlebars template but then they become a mangled tangled mess. Are there any other options? Thanks!
Aucun commentaire:
Enregistrer un commentaire