Add required attributes to directive.