Skip to content

sebastiankade/angular-shortcut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular Shortcut

An angular shortcut system based of Zach Snow's blog post: http://zachsnow.com/#!/blog/2013/angularjs-shortcuts/

Shortcuts are english based rather than key codes so you don't have to keep looking them up.

Install

npm install angular-shortcut

In your app: angular.module('app', ['ng.shortcut'])

Usage

Can be used as a directive on any clickable item. <button ng-shortcut="'enter'" ng-shortcut-click></button>

Or anywhere else: <shortcut ng-shortcut="'enter'" ng-shortcut-action="someScopeMethod()"></shortcut>

It detaches with scope $destroy so you can use normal ng-if to enable/disable <shortcut ng-if="somethingIsEnabled" ng-shortcut="'enter'" ng-shortcut-action="someScopeMethod()"></shortcut>

Test

Not written yet.

About

Keyboard Shortcuts for Angular 1.x apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published