Custom directive, passing function into scope