Skip to content

Instantly share code, notes, and snippets.

@Morgul
Last active August 29, 2015 13:57
Show Gist options
  • Save Morgul/9425235 to your computer and use it in GitHub Desktop.
Save Morgul/9425235 to your computer and use it in GitHub Desktop.
<!-- ng-class style -->
<button class="btn btn-default" ng-keypress="{enter: doStuff, up-arrow: doStuff2}">Activate Me!</button>
<!-- dual attribtues -->
<button class="btn-default" ng-keypress="doStuff" key="up-arrow">Activate Me!</button>
@Morgul
Copy link
Author

Morgul commented Mar 8, 2014

Oh, my bad. That's a typo.

See, Angular has support for this; this is exactly what they do in the ng-class directive. So, I believe $parse is what we'd be looking for... but we can check the code of ng-class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment