explorers' club

explorations in dev, science, sci-fi, games, and other fun stuff!

Angular: ngBackspace Directive

Leave a comment

I’m not entirely sure why certain keys on a keyboard fire keydown but not keyup, some fire keypress while others don’t and then in the backspace’s case, it only fires on keyup.  Nevertheless I found myself in need of triggering action on backspace.

[gist https://gist.github.com/jusopi/b89fb2cd31a2da8d0fed]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s