Change directives to use attributes for better browser support