AngularJS Directive - How to let an event only be triggered once if otherwise it'll be triggered on multiple elements?
问题 This is what I currently have: http://plnkr.co/edit/L9XqEyOtRSGHc9rqFPJX I am trying to make it so that when I press the down key for the first time, the focus will move onto #div2 ; repeating the action should have the focus moving onto li > div:first-child . In the demo however, upon the first time the down key is pressed, the focus will jump to li > div:first-child directly, because both the key-map on #div1 and #div2 captured the same keydown event, so the focus jumps from #div1 to #div2