exAres
exAres

Reputation: 4926

How to handle action wrapped inside other action in emberjs?

Consider following emberjs-template :

<div>
    <div {{action 'outer_selected'}}>
        Outer Link
        <span {{action 'inner_selected'}}>
            Inner Link   
        </span>
    </div>
</div>

which basically wraps one action inside another. The problem is when I click on inner element, both actions get fired. How can I prevent the outer action from getting fired when clicked on inner element ?

Upvotes: 1

Views: 423

Answers (1)

dimusic
dimusic

Reputation: 4133

Use bubbles=false in your template to stop event propogation - http://emberjs.com/guides/templates/actions/#toc_stopping-event-propagation

Example

Upvotes: 1

Related Questions