attrs to directives