Genericising Angular directives