mercredi 29 juillet 2015

How to bind a controller action to a link that is clicked or hovered?

I have a problem connected with binding an action to a link. When I create a simple link (only a "text" reference), I am able to send the action to the controller and it works like a charm.

On the other hand, I am not able to do this when I want to make my flower element highlighted on hover and active state -> when I have a text (like in previous case) and corresponding part of the picture that gets highlighted on hover and click (pure SASS in this case).

Here is my hbs code:

<div id="flowers-list">
 <ul class="flowers">
  <li class="flower1">
    <a href="#/" {{action "selectFlower" "rose"}}>Rose</a>
  </li>
 </ul>
</div>

Could you please give me a hint how to deal with this problem?

I have already tried adding on=click to my link, but it did not help.




Aucun commentaire:

Enregistrer un commentaire