Open kgusarov opened 8 years ago
Yep this seems reasonable. I think using components instead of compiled templates might be the way to go.
Also I've "hacked" dynamically created components. Notice:
parentView: self
Is the reason for parentView: self
because you wanted your actions to be handled by the controller and not swallowed by aupac-typeahead
? We need a good and official way of handling this as there will be an unknown number of actions on the component. Ideas are welcome.
Actually I was trying to trigger action in aupac-typeahead
. Maybe something has changed now since I am using Ember 1.13.10. However action wasn't triggered and I've received something like
component::ember472 has no handler for action XXX
Yes, this was sort of hack - in order to write {{action 'someAction' target=parentView}}
in component template. However this doesn't seem a correct way to me. Main problem here is that dynamically create component isn't linked to its parent in correct way. I've currently haven't studied more correct way since this change had to be made ASAP but I am sure that it exists.
Hi,
we are trying to trigger actions from the template, too. This has to fail as the template is rendered in its own component and therefore does not have access to any other scope. Here is a demonstration:
I would be happy to help with implementing this (maybe in combination with allowing the use of different components), but I am not sure what might be the best way to approach this.
Hi!
In my opinion it would be nice to be able not to only specify template but also the component for typeahead templates. Recently I've had to create a footer with custom action and this is what I've came to:
Notice that I've had to copy almost all the code just to change small part of it :)