The div bouton-favori look like a heart (see image) and is over the image. But when a user click on the heart, the heart has to change colour and the action is registered for later use. I don’t want the link to be active when a user clicks the heart.
Let me know if you still need a code example. Maybe I have some time today. You can add a setDisabledFlag=setDisabledFlag action to your component and call that action from your component.
This sounds like a place where you are trying to use a link-to for something other than it’s purpose. Are you just using it to get an .active class? If so, you may want to just create a ‘heart-meter’ component instead of trying to force these concepts together. You can then transition to the route or whatever from the action etc. I would have to know more about the intention… but that is my first impression.
Hello @emanuk. You are really close. You do not need to add bubbles=false to the link-to component, but to the compte-favori-bouton. Or if your component handles the click event, you just need to return false.
Take a look here. I added both examples → Ember Twiddle
PS this works because you do not want you click event to bubble up to the link-to component, thats why you have to stop it before it gets there. Not stop it when it reaches it, which happens when you do {{#link-to ... bubbles=false...