Passing named arguments to a directive’s callback

Imagine that you’re writing a directive to show a login form. This directive would also check your credentials and call an external function if they’re wrong. You could use it like follows :

<login-box on-fail="wizzle()"></login-box>

I’m sure you know how to implement a login form and a couple of HTTP requests. But do you know how to pass named arguments in your callback ? Let’s find out. Continue reading