I would like to send a call back into a directive via a parameter on the tag, and then call that method when appropriate inside the directive. For example, when a button was
Tricky tricky angular, when declaring the argument in the HTML, it needs to use snake case, instead of camelcase to match.
Works:
<hello-world on-load-callback="myCallback(arg1)"></hello-world>
Doesn't Work:
<hello-world onLoadCallback="myCallback(arg1)"></hello-world>
Also the callback needs to be:
scope.onLoadCallback({arg1: 'wtf'});
The named parameters are then bound to the corresponding parameters used in the callback attribute (not all need to be used).