explorers' club

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


Leave a comment

Note to Self: Angular Directive Communication (via Isolate Scope) to Parent Scope with Object Parameter

Given the following HTML

How do we communicate the value known only to the directive but passing back to the controller’s scope?  Like so:

Advertisements


Leave a comment

Angular: ngBackspace Directive

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]