Last active
July 6, 2016 10:47
-
-
Save johnnyelwailer/5089582 to your computer and use it in GitHub Desktop.
keyboard navigation directive / service in angular js (depends on jq and rxjs)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li class="dropdown" ng-controller="DropdownCtrl"> | |
<a class="dropdown-toggle" | |
ui:keyboard-navigatable | |
navigate-on="{up: selectPreviousItem, down: selectNextItem, submit: close, escape: close}"> | |
Click me for a dropdown, yo! | |
</a> | |
<ul class="dropdown-menu"> | |
<li ng-repeat="choice in items"> | |
<a>{{choice}}</a> | |
</li> | |
</ul> | |
</li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment