vendredi 27 février 2015

Ember 1.8.1- component link-to not working with action

I am using Ember 1.8.1. I have a component for some notifications. They use dynamic variables to determine a link-to ( I use computed properties to determine the proper route, and model to send through. This is calculating correctly.). Then within the link-to an action is defined.



{{#link-to event.routeName event.routeTarget}}
<li {{action "eventClick" event}}>
..other markup...
</li>
{{/link-to}}


Everything was working before I moved these into a component. My problem now is that while the action works, and the URL is being properly formed (on hover I can see that I have the correct URL that my link-to should be creating), when I click on the link in the UI, the action fires, but the link does not transition as it is supposed to.


I've dealt with the opposite problem before - actions within a link-to not working correctly, but never the problem this way. Is there something obvious I am missing? I've searched through the documentation and can't seem to find anything that tells me what I'm doing is wrong.


Recap: In my Ember component, why does the routing for the link-to not work, but the action within it does? Again- this all worked before making it a component, so I'm not sure what the difference is.


Thanks in advance for your help.





Aucun commentaire:

Enregistrer un commentaire