fix(directive): name anonymous functions

For debugging ease.